repo_id
stringclasses
400 values
cross_repo_split
stringclasses
1 value
commit_index
int32
0
1.19k
commit_sha
stringlengths
40
40
in_repo_split
stringclasses
3 values
test_file
stringlengths
7
121
file_split
stringclasses
3 values
split_group
stringlengths
18
150
lineno
int32
1
5.24k
col_offset
int32
0
165
assertion_type
stringclasses
35 values
test_function
stringlengths
0
141
prefix
large_stringlengths
7
258k
target
stringlengths
1
29.2k
assertion_event_type
stringclasses
2 values
assertion_event_id
stringlengths
64
64
assertion_anchor
large_stringlengths
14
176k
old_target
stringlengths
1
11.2k
old_lineno
int32
2
4.91k
old_col_offset
int32
0
165
urllib3/urllib3
train
223
d0214f3008a36928e44b3e573ebc844995235b35
train
test/test_poolmanager.py
train
urllib3/urllib3:test/test_poolmanager.py
367
8
self.assertEqual
test_merge_pool_kwargs
import socket import sys from urllib3.poolmanager import ( PoolKey, key_fn_by_scheme, PoolManager, ) from urllib3 import connection_from_url from urllib3.exceptions import ( ClosedPoolError, LocationValueError, ) from urllib3.util import retry, timeout if sys.version_info >= (2, 7): import uni...
merged)
added
84663945b9112a11819f4fe4b756f761bd23b67c52a026009d1e726b877c993b
self.assertEqual|test_merge_pool_kwargs|import socket import sys from urllib3.poolmanager import ( PoolKey, key_fn_by_scheme, PoolManager, ) from urllib3 import connection_from_url from urllib3.exceptions import ( ClosedPoolError, LocationValueError, ) from urllib3.util import retry, timeout if sys.version_info >= (2, ...
null
null
null
urllib3/urllib3
train
223
d0214f3008a36928e44b3e573ebc844995235b35
train
test/test_poolmanager.py
train
urllib3/urllib3:test/test_poolmanager.py
375
8
self.assertEqual
test_merge_pool_kwargs_none
import socket import sys from urllib3.poolmanager import ( PoolKey, key_fn_by_scheme, PoolManager, ) from urllib3 import connection_from_url from urllib3.exceptions import ( ClosedPoolError, LocationValueError, ) from urllib3.util import retry, timeout if sys.version_info >= (2, 7): import uni...
merged)
added
e16e920f068a81522fe4a17ad5a40f254dfa0706ba1e9269205d47b23b32e581
self.assertEqual|test_merge_pool_kwargs_none|import socket import sys from urllib3.poolmanager import ( PoolKey, key_fn_by_scheme, PoolManager, ) from urllib3 import connection_from_url from urllib3.exceptions import ( ClosedPoolError, LocationValueError, ) from urllib3.util import retry, timeout if sys.version_info >=...
null
null
null
urllib3/urllib3
train
224
c77ab0c37c0aeab64760a4ea85a0e691da69d62f
train
test/test_poolmanager.py
train
urllib3/urllib3:test/test_poolmanager.py
300
8
self.assertTrue
test_http_connection_from_context_case_insensitive
import socket import sys from urllib3.poolmanager import ( PoolKey, key_fn_by_scheme, PoolManager, ) from urllib3 import connection_from_url from urllib3.exceptions import ( ClosedPoolError, LocationValueError, ) from urllib3.util import retry, timeout if sys.version_info >= (2, 7): import uni...
pool is other_pool)
added
00d1a03f4e3a77f5c459abeb62c8c7b2b8c85adb61387b69237e969a4e63ff9b
self.assertTrue|test_http_connection_from_context_case_insensitive|import socket import sys from urllib3.poolmanager import ( PoolKey, key_fn_by_scheme, PoolManager, ) from urllib3 import connection_from_url from urllib3.exceptions import ( ClosedPoolError, LocationValueError, ) from urllib3.util import retry, timeout ...
null
null
null
urllib3/urllib3
train
224
c77ab0c37c0aeab64760a4ea85a0e691da69d62f
train
test/test_poolmanager.py
train
urllib3/urllib3:test/test_poolmanager.py
318
8
self.assertFalse
test_custom_pool_key
import socket import sys from urllib3.poolmanager import ( PoolKey, key_fn_by_scheme, PoolManager, ) from urllib3 import connection_from_url from urllib3.exceptions import ( ClosedPoolError, LocationValueError, ) from urllib3.util import retry, timeout if sys.version_info >= (2, 7): import uni...
pool1 is pool2)
added
5dece5150b202c09486bbf6c4edb15d563741e2bded8ef406507c8490d5a9378
self.assertFalse|test_custom_pool_key|import socket import sys from urllib3.poolmanager import ( PoolKey, key_fn_by_scheme, PoolManager, ) from urllib3 import connection_from_url from urllib3.exceptions import ( ClosedPoolError, LocationValueError, ) from urllib3.util import retry, timeout if sys.version_info >= (2, 7)...
null
null
null
urllib3/urllib3
train
224
c77ab0c37c0aeab64760a4ea85a0e691da69d62f
train
test/test_poolmanager.py
train
urllib3/urllib3:test/test_poolmanager.py
334
8
self.assertEqual
test_override_pool_kwargs_url
import socket import sys from urllib3.poolmanager import ( PoolKey, key_fn_by_scheme, PoolManager, ) from urllib3 import connection_from_url from urllib3.exceptions import ( ClosedPoolError, LocationValueError, ) from urllib3.util import retry, timeout if sys.version_info >= (2, 7): import uni...
override_pool.retries)
added
49300fe7714d5623a9b4b45b7c50569f56377d1632d4ab21162cc9ae958d6d6e
self.assertEqual|test_override_pool_kwargs_url|import socket import sys from urllib3.poolmanager import ( PoolKey, key_fn_by_scheme, PoolManager, ) from urllib3 import connection_from_url from urllib3.exceptions import ( ClosedPoolError, LocationValueError, ) from urllib3.util import retry, timeout if sys.version_info ...
null
null
null
urllib3/urllib3
train
224
c77ab0c37c0aeab64760a4ea85a0e691da69d62f
train
test/test_poolmanager.py
train
urllib3/urllib3:test/test_poolmanager.py
385
8
self.assertEqual
test_merge_pool_kwargs_none
import socket import sys from urllib3.poolmanager import ( PoolKey, key_fn_by_scheme, PoolManager, ) from urllib3 import connection_from_url from urllib3.exceptions import ( ClosedPoolError, LocationValueError, ) from urllib3.util import retry, timeout if sys.version_info >= (2, 7): import uni...
merged)
added
2cf75dbc4163977e2e663dd08059404141492d2e6b98f8ae0ae223fb915b55ec
self.assertEqual|test_merge_pool_kwargs_none|import socket import sys from urllib3.poolmanager import ( PoolKey, key_fn_by_scheme, PoolManager, ) from urllib3 import connection_from_url from urllib3.exceptions import ( ClosedPoolError, LocationValueError, ) from urllib3.util import retry, timeout if sys.version_info >=...
null
null
null
urllib3/urllib3
train
225
8dd2dede566dfadd7855681bc57f639d0293a0de
train
test/with_dummyserver/test_connectionpool.py
train
urllib3/urllib3:test/with_dummyserver/test_connectionpool.py
213
8
self.assertRaises
test_total_timeout
import io import logging import socket import sys import unittest import time import warnings import mock from .. import ( TARPIT_HOST, VALID_SOURCE_ADDRESSES, INVALID_SOURCE_ADDRESSES, ) from ..port_helpers import find_unused_port from urllib3 import ( encode_multipart_formdata, HTTPConnectionPool, ) fro...
ReadTimeoutError)
modified
ed43bbc0e859bd5885e467425ab048c7fd9c1fd2e4f6467f024b5032e5b722d4
self.assertRaises|test_total_timeout|import io import logging import socket import sys import unittest import time import warnings import mock from .. import ( TARPIT_HOST, VALID_SOURCE_ADDRESSES, INVALID_SOURCE_ADDRESSES, ) from ..port_helpers import find_unused_port from urllib3 import ( encode_multipart_formdata, HT...
ReadTimeoutError)
211
8
urllib3/urllib3
train
225
8dd2dede566dfadd7855681bc57f639d0293a0de
train
test/with_dummyserver/test_connectionpool.py
train
urllib3/urllib3:test/with_dummyserver/test_connectionpool.py
490
8
self.assertEqual
test_post_with_urlencode
import io import logging import socket import sys import unittest import time import warnings import mock from .. import ( TARPIT_HOST, VALID_SOURCE_ADDRESSES, INVALID_SOURCE_ADDRESSES, ) from ..port_helpers import find_unused_port from urllib3 import ( encode_multipart_formdata, HTTPConnectionPool, ) fro...
urlencode(data))
added
d483220d35fb7da699e0c28a61a920fa79973fe0ad0f5ce07be36c5e69846d5b
self.assertEqual|test_post_with_urlencode|import io import logging import socket import sys import unittest import time import warnings import mock from .. import ( TARPIT_HOST, VALID_SOURCE_ADDRESSES, INVALID_SOURCE_ADDRESSES, ) from ..port_helpers import find_unused_port from urllib3 import ( encode_multipart_formdat...
null
null
null
urllib3/urllib3
train
225
8dd2dede566dfadd7855681bc57f639d0293a0de
train
test/with_dummyserver/test_connectionpool.py
train
urllib3/urllib3:test/with_dummyserver/test_connectionpool.py
527
8
self.assertEqual
test_check_deflate
import io import logging import socket import sys import unittest import time import warnings import mock from .. import ( TARPIT_HOST, VALID_SOURCE_ADDRESSES, INVALID_SOURCE_ADDRESSES, ) from ..port_helpers import find_unused_port from urllib3 import ( encode_multipart_formdata, HTTPConnectionPool, ) fro...
b'hello, world!')
added
70bd9c38cc653f86d21a61ccc438e3536f5fe52c911e49c342fa93e211f1d6a7
self.assertEqual|test_check_deflate|import io import logging import socket import sys import unittest import time import warnings import mock from .. import ( TARPIT_HOST, VALID_SOURCE_ADDRESSES, INVALID_SOURCE_ADDRESSES, ) from ..port_helpers import find_unused_port from urllib3 import ( encode_multipart_formdata, HTT...
null
null
null
urllib3/urllib3
train
225
8dd2dede566dfadd7855681bc57f639d0293a0de
train
test/with_dummyserver/test_https.py
train
urllib3/urllib3:test/with_dummyserver/test_https.py
197
12
self.assertTrue
test_verified_with_bad_ca_certs
import datetime import logging import ssl import sys import unittest import warnings import mock from nose.plugins.skip import SkipTest from dummyserver.testcase import ( HTTPSDummyServerTestCase, IPV6HTTPSDummyServerTestCase ) from dummyserver.server import (DEFAULT_CA, DEFAULT_CA_BAD, DEFAULT_CERTS, ...
'certificate verify failed' in str(e))
modified
cb6527f11c0cef01c62fb746949ff11f4c6f15fa1aa0dec7f8b34bd6ea0c078c
self.assertTrue|test_verified_with_bad_ca_certs|import datetime import logging import ssl import sys import unittest import warnings import mock from nose.plugins.skip import SkipTest from dummyserver.testcase import ( HTTPSDummyServerTestCase, IPV6HTTPSDummyServerTestCase ) from dummyserver.server import (DEFAULT_CA, ...
'certificate verify failed' in str(e))
196
12
urllib3/urllib3
train
225
8dd2dede566dfadd7855681bc57f639d0293a0de
train
test/with_dummyserver/test_https.py
train
urllib3/urllib3:test/with_dummyserver/test_https.py
344
8
self.assertRaises
test_assert_invalid_fingerprint
import datetime import logging import ssl import sys import unittest import warnings import mock from nose.plugins.skip import SkipTest from dummyserver.testcase import ( HTTPSDummyServerTestCase, IPV6HTTPSDummyServerTestCase ) from dummyserver.server import (DEFAULT_CA, DEFAULT_CA_BAD, DEFAULT_CERTS, ...
SSLError)
modified
f9ad5694342ced206492f396e1ad96481c570dd527c016c24688fcf1f1e2654c
self.assertRaises|test_assert_invalid_fingerprint|import datetime import logging import ssl import sys import unittest import warnings import mock from nose.plugins.skip import SkipTest from dummyserver.testcase import ( HTTPSDummyServerTestCase, IPV6HTTPSDummyServerTestCase ) from dummyserver.server import (DEFAULT_CA...
SSLError)
343
8
urllib3/urllib3
train
225
8dd2dede566dfadd7855681bc57f639d0293a0de
train
test/with_dummyserver/test_proxy_poolmanager.py
train
urllib3/urllib3:test/with_dummyserver/test_proxy_poolmanager.py
232
8
self.assertEqual
test_headers
import json import socket import unittest from nose.tools import timed from dummyserver.testcase import HTTPDummyProxyTestCase, IPv6HTTPDummyProxyTestCase from dummyserver.server import ( DEFAULT_CA, DEFAULT_CA_BAD, get_unreachable_address) from .. import TARPIT_HOST, requires_network from urllib3._collections i...
'quux')
modified
39a9c62bcee3dd58ac7e9dda6f3f0c8e431862a87fb2e35f9ccbac2be1f248ef
self.assertEqual|test_headers|import json import socket import unittest from nose.tools import timed from dummyserver.testcase import HTTPDummyProxyTestCase, IPv6HTTPDummyProxyTestCase from dummyserver.server import ( DEFAULT_CA, DEFAULT_CA_BAD, get_unreachable_address) from .. import TARPIT_HOST, requires_network from...
'quux')
231
8
urllib3/urllib3
train
225
8dd2dede566dfadd7855681bc57f639d0293a0de
train
test/with_dummyserver/test_proxy_poolmanager.py
train
urllib3/urllib3:test/with_dummyserver/test_proxy_poolmanager.py
305
12
self.assertEqual
test_https_proxy_timeout
import json import socket import unittest from nose.tools import timed from dummyserver.testcase import HTTPDummyProxyTestCase, IPv6HTTPDummyProxyTestCase from dummyserver.server import ( DEFAULT_CA, DEFAULT_CA_BAD, get_unreachable_address) from .. import TARPIT_HOST, requires_network from urllib3._collections i...
ConnectTimeoutError)
modified
8ac0ffca3a71a987300b76e2fb9b9e08e0753d4cb4da76cd9820aa9261adeaa3
self.assertEqual|test_https_proxy_timeout|import json import socket import unittest from nose.tools import timed from dummyserver.testcase import HTTPDummyProxyTestCase, IPv6HTTPDummyProxyTestCase from dummyserver.server import ( DEFAULT_CA, DEFAULT_CA_BAD, get_unreachable_address) from .. import TARPIT_HOST, requires_...
ConnectTimeoutError)
304
12
urllib3/urllib3
train
225
8dd2dede566dfadd7855681bc57f639d0293a0de
train
test/with_dummyserver/test_proxy_poolmanager.py
train
urllib3/urllib3:test/with_dummyserver/test_proxy_poolmanager.py
317
12
self.assertEqual
test_https_proxy_pool_timeout
import json import socket import unittest from nose.tools import timed from dummyserver.testcase import HTTPDummyProxyTestCase, IPv6HTTPDummyProxyTestCase from dummyserver.server import ( DEFAULT_CA, DEFAULT_CA_BAD, get_unreachable_address) from .. import TARPIT_HOST, requires_network from urllib3._collections i...
ConnectTimeoutError)
modified
e33c3cf41f081a7ffd4f29bfcecd9b6111c6872b581983b575e0680a0288ef96
self.assertEqual|test_https_proxy_pool_timeout|import json import socket import unittest from nose.tools import timed from dummyserver.testcase import HTTPDummyProxyTestCase, IPv6HTTPDummyProxyTestCase from dummyserver.server import ( DEFAULT_CA, DEFAULT_CA_BAD, get_unreachable_address) from .. import TARPIT_HOST, requ...
ConnectTimeoutError)
316
12
urllib3/urllib3
train
226
7a6fe68bcf8125e37a136c33eb65f9cd57efcacd
train
test/with_dummyserver/test_https.py
train
urllib3/urllib3:test/with_dummyserver/test_https.py
163
12
self.assertFalse
test_ca_dir_verified
import datetime import logging import ssl import sys import unittest import warnings import mock from nose.plugins.skip import SkipTest from dummyserver.testcase import ( HTTPSDummyServerTestCase, IPV6HTTPSDummyServerTestCase ) from dummyserver.server import (DEFAULT_CA, DEFAULT_CA_BAD, DEFAULT_CERTS, ...
warn.called)
modified
38047ace37e4f8d7ae6d62a8ce2e2481d814cf11132c865abff355e4f9b44f4c
self.assertFalse|test_ca_dir_verified|import datetime import logging import ssl import sys import unittest import warnings import mock from nose.plugins.skip import SkipTest from dummyserver.testcase import ( HTTPSDummyServerTestCase, IPV6HTTPSDummyServerTestCase ) from dummyserver.server import (DEFAULT_CA, DEFAULT_CA...
warn.called)
165
16
urllib3/urllib3
train
226
7a6fe68bcf8125e37a136c33eb65f9cd57efcacd
train
test/with_dummyserver/test_https.py
train
urllib3/urllib3:test/with_dummyserver/test_https.py
175
12
self.assertTrue
test_invalid_common_name
import datetime import logging import ssl import sys import unittest import warnings import mock from nose.plugins.skip import SkipTest from dummyserver.testcase import ( HTTPSDummyServerTestCase, IPV6HTTPSDummyServerTestCase ) from dummyserver.server import (DEFAULT_CA, DEFAULT_CA_BAD, DEFAULT_CERTS, ...
"doesn't match" in str(e) or "certificate verify failed" in str(e))
added
ce8178add3970135a3c821025c86a882cc4ca9052373b59330fef436ddb53a8c
self.assertTrue|test_invalid_common_name|import datetime import logging import ssl import sys import unittest import warnings import mock from nose.plugins.skip import SkipTest from dummyserver.testcase import ( HTTPSDummyServerTestCase, IPV6HTTPSDummyServerTestCase ) from dummyserver.server import (DEFAULT_CA, DEFAULT...
null
null
null
urllib3/urllib3
train
226
7a6fe68bcf8125e37a136c33eb65f9cd57efcacd
train
test/with_dummyserver/test_https.py
train
urllib3/urllib3:test/with_dummyserver/test_https.py
231
12
self.assertTrue
test_unverified_ssl
import datetime import logging import ssl import sys import unittest import warnings import mock from nose.plugins.skip import SkipTest from dummyserver.testcase import ( HTTPSDummyServerTestCase, IPV6HTTPSDummyServerTestCase ) from dummyserver.server import (DEFAULT_CA, DEFAULT_CA_BAD, DEFAULT_CERTS, ...
warn.called)
added
02b20c9892c612aa6a4013cb9b52b213ce2989ba60dac8e2480f251b78939abf
self.assertTrue|test_unverified_ssl|import datetime import logging import ssl import sys import unittest import warnings import mock from nose.plugins.skip import SkipTest from dummyserver.testcase import ( HTTPSDummyServerTestCase, IPV6HTTPSDummyServerTestCase ) from dummyserver.server import (DEFAULT_CA, DEFAULT_CA_B...
null
null
null
urllib3/urllib3
train
226
7a6fe68bcf8125e37a136c33eb65f9cd57efcacd
train
test/with_dummyserver/test_https.py
train
urllib3/urllib3:test/with_dummyserver/test_https.py
347
8
self.assertRaises
test_verify_none_and_bad_fingerprint
import datetime import logging import ssl import sys import unittest import warnings import mock from nose.plugins.skip import SkipTest from dummyserver.testcase import ( HTTPSDummyServerTestCase, IPV6HTTPSDummyServerTestCase ) from dummyserver.server import (DEFAULT_CA, DEFAULT_CA_BAD, DEFAULT_CERTS, ...
SSLError)
added
0b160e99adbbbe20c80af1fe1385d836e1a36dd05105553ba6c98cead6714799
self.assertRaises|test_verify_none_and_bad_fingerprint|import datetime import logging import ssl import sys import unittest import warnings import mock from nose.plugins.skip import SkipTest from dummyserver.testcase import ( HTTPSDummyServerTestCase, IPV6HTTPSDummyServerTestCase ) from dummyserver.server import (DEFAU...
null
null
null
urllib3/urllib3
train
227
2426b6ef0d19be3d2c0b0d16e33966d23d17bf9f
train
test/test_util.py
train
urllib3/urllib3:test/test_util.py
559
12
self.assertFalse
test_has_ipv6_disabled_on_compile
import hashlib import warnings import logging import io import unittest import ssl import socket from itertools import chain from mock import patch, Mock from urllib3 import add_stderr_logger, disable_warnings from urllib3.util.request import make_headers, rewind_body, _FAILEDTELL from urllib3.util.retry import Retry...
_has_ipv6('::1'))
added
dcc4d7aa732860d319a8525ae499f7ca2ed593174d0728beb02e47ad7cf30a5b
self.assertFalse|test_has_ipv6_disabled_on_compile|import hashlib import warnings import logging import io import unittest import ssl import socket from itertools import chain from mock import patch, Mock from urllib3 import add_stderr_logger, disable_warnings from urllib3.util.request import make_headers, rewind_body,...
null
null
null
urllib3/urllib3
train
227
2426b6ef0d19be3d2c0b0d16e33966d23d17bf9f
train
test/test_util.py
train
urllib3/urllib3:test/test_util.py
566
16
self.assertFalse
test_has_ipv6_enabled_but_fails
import hashlib import warnings import logging import io import unittest import ssl import socket from itertools import chain from mock import patch, Mock from urllib3 import add_stderr_logger, disable_warnings from urllib3.util.request import make_headers, rewind_body, _FAILEDTELL from urllib3.util.retry import Retry...
_has_ipv6('::1'))
added
d64acdabae54c7ece10310b2d5b9a6a5efb2ec102d9949709fb852abcf584b91
self.assertFalse|test_has_ipv6_enabled_but_fails|import hashlib import warnings import logging import io import unittest import ssl import socket from itertools import chain from mock import patch, Mock from urllib3 import add_stderr_logger, disable_warnings from urllib3.util.request import make_headers, rewind_body, _...
null
null
null
urllib3/urllib3
train
227
2426b6ef0d19be3d2c0b0d16e33966d23d17bf9f
train
test/test_util.py
train
urllib3/urllib3:test/test_util.py
573
16
self.assertTrue
test_has_ipv6_enabled_and_working
import hashlib import warnings import logging import io import unittest import ssl import socket from itertools import chain from mock import patch, Mock from urllib3 import add_stderr_logger, disable_warnings from urllib3.util.request import make_headers, rewind_body, _FAILEDTELL from urllib3.util.retry import Retry...
_has_ipv6('::1'))
added
a896e621c14bf262b925e56dd721f3353d59b6f5d58f0143eb65d56586ee6536
self.assertTrue|test_has_ipv6_enabled_and_working|import hashlib import warnings import logging import io import unittest import ssl import socket from itertools import chain from mock import patch, Mock from urllib3 import add_stderr_logger, disable_warnings from urllib3.util.request import make_headers, rewind_body, ...
null
null
null
urllib3/urllib3
train
227
2426b6ef0d19be3d2c0b0d16e33966d23d17bf9f
train
test/test_util.py
train
urllib3/urllib3:test/test_util.py
581
12
self.assertEqual
test_ip_family_ipv6_disabled
import hashlib import warnings import logging import io import unittest import ssl import socket from itertools import chain from mock import patch, Mock from urllib3 import add_stderr_logger, disable_warnings from urllib3.util.request import make_headers, rewind_body, _FAILEDTELL from urllib3.util.retry import Retry...
socket.AF_INET)
added
a56ce4d79e70076225c4e0f1f55ae7feedf9243101d9ac052d28851f3d7439c7
self.assertEqual|test_ip_family_ipv6_disabled|import hashlib import warnings import logging import io import unittest import ssl import socket from itertools import chain from mock import patch, Mock from urllib3 import add_stderr_logger, disable_warnings from urllib3.util.request import make_headers, rewind_body, _FAI...
null
null
null
urllib3/urllib3
train
228
23edb7986d47150f620edb68c5a563baec7bda40
train
test/test_collections.py
train
urllib3/urllib3:test/test_collections.py
163
8
assert
test_create_from_iterator
from urllib3._collections import ( HTTPHeaderDict, RecentlyUsedContainer as Container ) import pytest from urllib3.packages import six xrange = six.moves.xrange class TestLRUContainer(object): def test_maxsize(self): d = Container(5) for i in xrange(5): d[i] = str(i) ...
len(set(teststr))
added
2b427776f5414406488b67bdc8ce96f38b6d532bbc0f3ba5e99c1e855e7b3542
assert|test_create_from_iterator|from urllib3._collections import ( HTTPHeaderDict, RecentlyUsedContainer as Container ) import pytest from urllib3.packages import six xrange = six.moves.xrange class TestLRUContainer(object): def test_maxsize(self): d = Container(5) for i in xrange(5): d[i] = str(i) assert len(d) == 5 ...
null
null
null
urllib3/urllib3
train
228
23edb7986d47150f620edb68c5a563baec7bda40
train
test/test_collections.py
train
urllib3/urllib3:test/test_collections.py
196
8
assert
test_update
from urllib3._collections import ( HTTPHeaderDict, RecentlyUsedContainer as Container ) import pytest from urllib3.packages import six xrange = six.moves.xrange class TestLRUContainer(object): def test_maxsize(self): d = Container(5) for i in xrange(5): d[i] = str(i) ...
'foo'
added
1b9b1fdd07f5eada33f63421f60d46f7a64e7768b5c1682dcef39a243e673660
assert|test_update|from urllib3._collections import ( HTTPHeaderDict, RecentlyUsedContainer as Container ) import pytest from urllib3.packages import six xrange = six.moves.xrange class TestLRUContainer(object): def test_maxsize(self): d = Container(5) for i in xrange(5): d[i] = str(i) assert len(d) == 5 for i in xrang...
null
null
null
urllib3/urllib3
train
228
23edb7986d47150f620edb68c5a563baec7bda40
train
test/test_collections.py
train
urllib3/urllib3:test/test_collections.py
238
8
assert
test_extend_from_headerdict
from urllib3._collections import ( HTTPHeaderDict, RecentlyUsedContainer as Container ) import pytest from urllib3.packages import six xrange = six.moves.xrange class TestLRUContainer(object): def test_maxsize(self): d = Container(5) for i in xrange(5): d[i] = str(i) ...
'foo, bar, foo'
added
34e79e101a4f5560e43665cecbe5b5385976a4aef68280de9faeddc542bdc3f3
assert|test_extend_from_headerdict|from urllib3._collections import ( HTTPHeaderDict, RecentlyUsedContainer as Container ) import pytest from urllib3.packages import six xrange = six.moves.xrange class TestLRUContainer(object): def test_maxsize(self): d = Container(5) for i in xrange(5): d[i] = str(i) assert len(d) == ...
null
null
null
urllib3/urllib3
train
228
23edb7986d47150f620edb68c5a563baec7bda40
train
test/test_collections.py
train
urllib3/urllib3:test/test_collections.py
255
8
assert
test_getlist_after_copy
from urllib3._collections import ( HTTPHeaderDict, RecentlyUsedContainer as Container ) import pytest from urllib3.packages import six xrange = six.moves.xrange class TestLRUContainer(object): def test_maxsize(self): d = Container(5) for i in xrange(5): d[i] = str(i) ...
HTTPHeaderDict(d).getlist('cookie')
added
58dc6313ae29ae050a11bb69753f4640e25ffb6a3ffbcb20ae7d856d155b838c
assert|test_getlist_after_copy|from urllib3._collections import ( HTTPHeaderDict, RecentlyUsedContainer as Container ) import pytest from urllib3.packages import six xrange = six.moves.xrange class TestLRUContainer(object): def test_maxsize(self): d = Container(5) for i in xrange(5): d[i] = str(i) assert len(d) == 5 fo...
null
null
null
urllib3/urllib3
train
229
b7f065e880e2d041796500d69379afc54fd71d9d
train
test/test_proxymanager.py
val
urllib3/urllib3:test/test_proxymanager.py
16
12
assert
test_proxy_headers
import pytest from urllib3.poolmanager import ProxyManager class TestProxyManager(object): def test_proxy_headers(self): url = 'http://pypi.python.org/test' with ProxyManager('http://something:1234') as p: # Verify default headers default_headers = {'Accept': '*/*', ...
default_headers
added
079d11cbbcae0e3236b90e87102a23d1f82612fb9cd8818ec83c63ab4bd140b0
assert|test_proxy_headers|import pytest from urllib3.poolmanager import ProxyManager class TestProxyManager(object): def test_proxy_headers(self): url = 'http://pypi.python.org/test' with ProxyManager('http://something:1234') as p: # Verify default headers default_headers = {'Accept': '*/*', 'Host': 'pypi.python.org'} ...
null
null
null
urllib3/urllib3
train
229
b7f065e880e2d041796500d69379afc54fd71d9d
train
test/test_proxymanager.py
val
urllib3/urllib3:test/test_proxymanager.py
24
12
assert
test_proxy_headers
import pytest from urllib3.poolmanager import ProxyManager class TestProxyManager(object): def test_proxy_headers(self): url = 'http://pypi.python.org/test' with ProxyManager('http://something:1234') as p: # Verify default headers default_headers = {'Accept': '*/*', ...
provided_headers
added
1ca0bc5d519d99b5fcea1aa171eec85647c731385ab156ea04b50e7f54473490
assert|test_proxy_headers|import pytest from urllib3.poolmanager import ProxyManager class TestProxyManager(object): def test_proxy_headers(self): url = 'http://pypi.python.org/test' with ProxyManager('http://something:1234') as p: # Verify default headers default_headers = {'Accept': '*/*', 'Host': 'pypi.python.org'} ...
null
null
null
urllib3/urllib3
train
229
b7f065e880e2d041796500d69379afc54fd71d9d
train
test/test_proxymanager.py
val
urllib3/urllib3:test/test_proxymanager.py
42
13
pytest.raises
test_invalid_scheme
import pytest from urllib3.poolmanager import ProxyManager class TestProxyManager(object): def test_proxy_headers(self): url = 'http://pypi.python.org/test' with ProxyManager('http://something:1234') as p: # Verify default headers default_headers = {'Accept': '*/*', ...
AssertionError)
added
1e7efb82764ceedd5414d6186bcc3ac0c93c16b2cbb34caac0288a4543c7a2ae
pytest.raises|test_invalid_scheme|import pytest from urllib3.poolmanager import ProxyManager class TestProxyManager(object): def test_proxy_headers(self): url = 'http://pypi.python.org/test' with ProxyManager('http://something:1234') as p: # Verify default headers default_headers = {'Accept': '*/*', 'Host': 'pypi.pytho...
null
null
null
urllib3/urllib3
train
229
b7f065e880e2d041796500d69379afc54fd71d9d
train
test/test_proxymanager.py
val
urllib3/urllib3:test/test_proxymanager.py
44
13
pytest.raises
test_invalid_scheme
import pytest from urllib3.poolmanager import ProxyManager class TestProxyManager(object): def test_proxy_headers(self): url = 'http://pypi.python.org/test' with ProxyManager('http://something:1234') as p: # Verify default headers default_headers = {'Accept': '*/*', ...
ValueError)
added
200467437b0ed6b2325c120546977b7e8dd00e7f8e24dc345524808f1b19467f
pytest.raises|test_invalid_scheme|import pytest from urllib3.poolmanager import ProxyManager class TestProxyManager(object): def test_proxy_headers(self): url = 'http://pypi.python.org/test' with ProxyManager('http://something:1234') as p: # Verify default headers default_headers = {'Accept': '*/*', 'Host': 'pypi.pytho...
null
null
null
urllib3/urllib3
train
230
f9b661d2b34b0448a16c9979191a87f277b6ea26
train
test/test_connection.py
test
urllib3/urllib3:test/test_connection.py
20
13
pytest.raises
test_match_hostname_no_cert
import datetime import mock import pytest from urllib3.connection import ( CertificateError, _match_hostname, RECENT_DATE ) class TestConnection(object): """ Tests in this suite should not make any network requests or connections. """ def test_match_hostname_no_cert(self): cert =...
ValueError)
added
ae47008338644e5bacae963424fb87e56714e99fe5acc3ff1bbee7e63e865761
pytest.raises|test_match_hostname_no_cert|import datetime import mock import pytest from urllib3.connection import ( CertificateError, _match_hostname, RECENT_DATE ) class TestConnection(object): """ Tests in this suite should not make any network requests or connections. """ def test_match_hostname_no_cert(self): cert...
null
null
null
urllib3/urllib3
train
230
f9b661d2b34b0448a16c9979191a87f277b6ea26
train
test/test_connection.py
test
urllib3/urllib3:test/test_connection.py
26
13
pytest.raises
test_match_hostname_empty_cert
import datetime import mock import pytest from urllib3.connection import ( CertificateError, _match_hostname, RECENT_DATE ) class TestConnection(object): """ Tests in this suite should not make any network requests or connections. """ def test_match_hostname_no_cert(self): cert =...
ValueError)
added
9d6fbf38cd43707e1636408f88cb2a5b4ff27517a7c366b77f0e3344fc83e5c3
pytest.raises|test_match_hostname_empty_cert|import datetime import mock import pytest from urllib3.connection import ( CertificateError, _match_hostname, RECENT_DATE ) class TestConnection(object): """ Tests in this suite should not make any network requests or connections. """ def test_match_hostname_no_cert(self): c...
null
null
null
urllib3/urllib3
train
230
f9b661d2b34b0448a16c9979191a87f277b6ea26
train
test/test_connection.py
test
urllib3/urllib3:test/test_connection.py
41
12
assert
test_match_hostname_mismatch
import datetime import mock import pytest from urllib3.connection import ( CertificateError, _match_hostname, RECENT_DATE ) class TestConnection(object): """ Tests in this suite should not make any network requests or connections. """ def test_match_hostname_no_cert(self): cert =...
"hostname 'bar' doesn't match 'foo'"
added
dc74afcf94faa1e596d0737c2663f8c8f222cf3a8bf7eab26af53ce7c3f1e6ad
assert|test_match_hostname_mismatch|import datetime import mock import pytest from urllib3.connection import ( CertificateError, _match_hostname, RECENT_DATE ) class TestConnection(object): """ Tests in this suite should not make any network requests or connections. """ def test_match_hostname_no_cert(self): cert = Non...
null
null
null
urllib3/urllib3
train
230
f9b661d2b34b0448a16c9979191a87f277b6ea26
train
test/test_connection.py
test
urllib3/urllib3:test/test_connection.py
55
8
assert
test_recent_date
import datetime import mock import pytest from urllib3.connection import ( CertificateError, _match_hostname, RECENT_DATE ) class TestConnection(object): """ Tests in this suite should not make any network requests or connections. """ def test_match_hostname_no_cert(self): cert =...
(datetime.datetime.today() - two_years).date()
added
113c7902f0e237d69274261d28c69b81ec936684be78c0836bf1785d2357af7a
assert|test_recent_date|import datetime import mock import pytest from urllib3.connection import ( CertificateError, _match_hostname, RECENT_DATE ) class TestConnection(object): """ Tests in this suite should not make any network requests or connections. """ def test_match_hostname_no_cert(self): cert = None asserted_h...
null
null
null
urllib3/urllib3
train
231
65783b92f81cfba1e4a60808c68bbc7e575abb37
train
test/test_connectionpool.py
train
urllib3/urllib3:test/test_connectionpool.py
115
12
assert
test_same_host_no_port_https
from __future__ import absolute_import import pytest from urllib3.connectionpool import ( connection_from_url, HTTPConnection, HTTPConnectionPool, HTTPSConnectionPool, ) from urllib3.response import httplib, HTTPResponse from urllib3.util.timeout import Timeout from urllib3.packages.six.moves.http_cli...
c.is_same_host(b)
added
19b3553dab06dfebe04da7d7790554c1f1505d66891286eb193867f768d078ac
assert|test_same_host_no_port_https|from __future__ import absolute_import import pytest from urllib3.connectionpool import ( connection_from_url, HTTPConnection, HTTPConnectionPool, HTTPSConnectionPool, ) from urllib3.response import httplib, HTTPResponse from urllib3.util.timeout import Timeout from urllib3.packages....
null
null
null
urllib3/urllib3
train
231
65783b92f81cfba1e4a60808c68bbc7e575abb37
train
test/test_connectionpool.py
train
urllib3/urllib3:test/test_connectionpool.py
243
13
pytest.raises
test_pool_close
from __future__ import absolute_import import pytest from urllib3.connectionpool import ( connection_from_url, HTTPConnection, HTTPConnectionPool, HTTPSConnectionPool, ) from urllib3.response import httplib, HTTPResponse from urllib3.util.timeout import Timeout from urllib3.packages.six.moves.http_cli...
ClosedPoolError)
added
2e40a43beaba742576beae4dcf5c338df15be1e26d6bd524e8e05804d3dbb4b2
pytest.raises|test_pool_close|from __future__ import absolute_import import pytest from urllib3.connectionpool import ( connection_from_url, HTTPConnection, HTTPConnectionPool, HTTPSConnectionPool, ) from urllib3.response import httplib, HTTPResponse from urllib3.util.timeout import Timeout from urllib3.packages.six.mo...
null
null
null
urllib3/urllib3
train
231
65783b92f81cfba1e4a60808c68bbc7e575abb37
train
test/test_connectionpool.py
train
urllib3/urllib3:test/test_connectionpool.py
278
8
assert
test_contextmanager
from __future__ import absolute_import import pytest from urllib3.connectionpool import ( connection_from_url, HTTPConnection, HTTPConnectionPool, HTTPSConnectionPool, ) from urllib3.response import httplib, HTTPResponse from urllib3.util.timeout import Timeout from urllib3.packages.six.moves.http_cli...
None
added
bf271d4803552042a06a82df22fa150f143be162a5c9946702fe0586623ea0b1
assert|test_contextmanager|from __future__ import absolute_import import pytest from urllib3.connectionpool import ( connection_from_url, HTTPConnection, HTTPConnectionPool, HTTPSConnectionPool, ) from urllib3.response import httplib, HTTPResponse from urllib3.util.timeout import Timeout from urllib3.packages.six.moves...
null
null
null
urllib3/urllib3
train
231
65783b92f81cfba1e4a60808c68bbc7e575abb37
train
test/test_connectionpool.py
train
urllib3/urllib3:test/test_connectionpool.py
290
12
assert
test_absolute_url
from __future__ import absolute_import import pytest from urllib3.connectionpool import ( connection_from_url, HTTPConnection, HTTPConnectionPool, HTTPSConnectionPool, ) from urllib3.response import httplib, HTTPResponse from urllib3.util.timeout import Timeout from urllib3.packages.six.moves.http_cli...
c._absolute_url('path?query=foo')
added
0a171ce92ce724040c740e3512f593929e3f4d5500d9c25705d1dfd6e064a9ec
assert|test_absolute_url|from __future__ import absolute_import import pytest from urllib3.connectionpool import ( connection_from_url, HTTPConnection, HTTPConnectionPool, HTTPSConnectionPool, ) from urllib3.response import httplib, HTTPResponse from urllib3.util.timeout import Timeout from urllib3.packages.six.moves.h...
null
null
null
urllib3/urllib3
train
232
75359d7f1b8bade4dba6eb6b3d2003f5b6ebcc88
train
test/test_fields.py
train
urllib3/urllib3:test/test_fields.py
16
8
assert
test_guess_content_type
import pytest from urllib3.fields import guess_content_type, RequestField from urllib3.packages.six import u from . import onlyPy2 class TestRequestField(object): @pytest.mark.parametrize('filename, content_types', [ ('image.jpg', ['image/jpeg', 'image/pjpeg']), ('notsure', ['application/octet-s...
content_types
added
0603040a00bab6c932d181c76b88e167e3f12cc3f4d35943420935b1e4c44d6a
assert|test_guess_content_type|import pytest from urllib3.fields import guess_content_type, RequestField from urllib3.packages.six import u from . import onlyPy2 class TestRequestField(object): @pytest.mark.parametrize('filename, content_types', [ ('image.jpg', ['image/jpeg', 'image/pjpeg']), ('notsure', ['application/...
null
null
null
urllib3/urllib3
train
232
75359d7f1b8bade4dba6eb6b3d2003f5b6ebcc88
train
test/test_fields.py
train
urllib3/urllib3:test/test_fields.py
20
8
assert
test_create
import pytest from urllib3.fields import guess_content_type, RequestField from urllib3.packages.six import u from . import onlyPy2 class TestRequestField(object): @pytest.mark.parametrize('filename, content_types', [ ('image.jpg', ['image/jpeg', 'image/pjpeg']), ('notsure', ['application/octet-s...
'\r\n'
added
1914de1cf7873a825c8a75388ec6f6d88f761776572fa142b79c23777260bb76
assert|test_create|import pytest from urllib3.fields import guess_content_type, RequestField from urllib3.packages.six import u from . import onlyPy2 class TestRequestField(object): @pytest.mark.parametrize('filename, content_types', [ ('image.jpg', ['image/jpeg', 'image/pjpeg']), ('notsure', ['application/octet-stream...
null
null
null
urllib3/urllib3
train
232
75359d7f1b8bade4dba6eb6b3d2003f5b6ebcc88
train
test/test_fields.py
train
urllib3/urllib3:test/test_fields.py
51
8
assert
test_render_parts
import pytest from urllib3.fields import guess_content_type, RequestField from urllib3.packages.six import u from . import onlyPy2 class TestRequestField(object): @pytest.mark.parametrize('filename, content_types', [ ('image.jpg', ['image/jpeg', 'image/pjpeg']), ('notsure', ['application/octet-s...
parts
added
cfd31c56bca7839f432032d5788161af735175afe3c91766f763e67a1b6fc852
assert|test_render_parts|import pytest from urllib3.fields import guess_content_type, RequestField from urllib3.packages.six import u from . import onlyPy2 class TestRequestField(object): @pytest.mark.parametrize('filename, content_types', [ ('image.jpg', ['image/jpeg', 'image/pjpeg']), ('notsure', ['application/octet-...
null
null
null
urllib3/urllib3
train
232
75359d7f1b8bade4dba6eb6b3d2003f5b6ebcc88
train
test/test_fields.py
train
urllib3/urllib3:test/test_fields.py
65
8
assert
test_render_unicode_bytes_py2
import pytest from urllib3.fields import guess_content_type, RequestField from urllib3.packages.six import u from . import onlyPy2 class TestRequestField(object): @pytest.mark.parametrize('filename, content_types', [ ('image.jpg', ['image/jpeg', 'image/pjpeg']), ('notsure', ['application/octet-s...
"filename*=utf-8''n%C3%A4me"
added
08046afaf5457dc36ca1c7870722c4dc62c3be5d4f39e5682ed60b12a0d8c0de
assert|test_render_unicode_bytes_py2|import pytest from urllib3.fields import guess_content_type, RequestField from urllib3.packages.six import u from . import onlyPy2 class TestRequestField(object): @pytest.mark.parametrize('filename, content_types', [ ('image.jpg', ['image/jpeg', 'image/pjpeg']), ('notsure', ['applic...
null
null
null
urllib3/urllib3
train
233
3695c67a7a417f3e06890983070a469c46f59fdf
train
test/test_filepost.py
val
urllib3/urllib3:test/test_filepost.py
17
8
assert
test_dict
import pytest from urllib3.filepost import encode_multipart_formdata, iter_fields from urllib3.fields import RequestField from urllib3.packages.six import b, u BOUNDARY = '!! test boundary !!' class TestIterfields(object): def test_dict(self): for fieldname, value in iter_fields(dict(a='b')): ...
[('a', 'b'), ('c', 'd')]
added
0347d3e41b2ac89d17258ec2326475296943b52dfe4986237367a7920aff99d6
assert|test_dict|import pytest from urllib3.filepost import encode_multipart_formdata, iter_fields from urllib3.fields import RequestField from urllib3.packages.six import b, u BOUNDARY = '!! test boundary !!' class TestIterfields(object): def test_dict(self): for fieldname, value in iter_fields(dict(a='b')): assert (f...
null
null
null
urllib3/urllib3
train
233
3695c67a7a417f3e06890983070a469c46f59fdf
train
test/test_filepost.py
val
urllib3/urllib3:test/test_filepost.py
59
8
assert
test_field_encoding
import pytest from urllib3.filepost import encode_multipart_formdata, iter_fields from urllib3.fields import RequestField from urllib3.packages.six import b, u BOUNDARY = '!! test boundary !!' class TestIterfields(object): def test_dict(self): for fieldname, value in iter_fields(dict(a='b')): ...
'multipart/form-data; boundary=' + str(BOUNDARY)
added
daf27b444fc8e5ea0d48af54e7129515a28c84355f7ce5d871d30c5748a98bfd
assert|test_field_encoding|import pytest from urllib3.filepost import encode_multipart_formdata, iter_fields from urllib3.fields import RequestField from urllib3.packages.six import b, u BOUNDARY = '!! test boundary !!' class TestIterfields(object): def test_dict(self): for fieldname, value in iter_fields(dict(a='b')):...
null
null
null
urllib3/urllib3
train
233
3695c67a7a417f3e06890983070a469c46f59fdf
train
test/test_filepost.py
val
urllib3/urllib3:test/test_filepost.py
72
8
assert
test_filename
import pytest from urllib3.filepost import encode_multipart_formdata, iter_fields from urllib3.fields import RequestField from urllib3.packages.six import b, u BOUNDARY = '!! test boundary !!' class TestIterfields(object): def test_dict(self): for fieldname, value in iter_fields(dict(a='b')): ...
expected
added
42a5c900dd0063452c4f8c89754334e4b6f2f4aa4286deebfc3486b3d3dda223
assert|test_filename|import pytest from urllib3.filepost import encode_multipart_formdata, iter_fields from urllib3.fields import RequestField from urllib3.packages.six import b, u BOUNDARY = '!! test boundary !!' class TestIterfields(object): def test_dict(self): for fieldname, value in iter_fields(dict(a='b')): asser...
null
null
null
urllib3/urllib3
train
233
3695c67a7a417f3e06890983070a469c46f59fdf
train
test/test_filepost.py
val
urllib3/urllib3:test/test_filepost.py
87
8
assert
test_textplain
import pytest from urllib3.filepost import encode_multipart_formdata, iter_fields from urllib3.fields import RequestField from urllib3.packages.six import b, u BOUNDARY = '!! test boundary !!' class TestIterfields(object): def test_dict(self): for fieldname, value in iter_fields(dict(a='b')): ...
expected
added
f141a934a68f92d8541f1928a3c1853f2a919dd6f4c7d4cccd384566e9af282a
assert|test_textplain|import pytest from urllib3.filepost import encode_multipart_formdata, iter_fields from urllib3.fields import RequestField from urllib3.packages.six import b, u BOUNDARY = '!! test boundary !!' class TestIterfields(object): def test_dict(self): for fieldname, value in iter_fields(dict(a='b')): asse...
null
null
null
urllib3/urllib3
train
234
df5c8379e7cb6e28ffd98117127baedcdb772e45
train
test/test_connectionpool.py
train
urllib3/urllib3:test/test_connectionpool.py
202
16
assert
_test
from __future__ import absolute_import import pytest from urllib3.connectionpool import ( connection_from_url, HTTPConnection, HTTPConnectionPool, HTTPSConnectionPool, ) from urllib3.response import httplib, HTTPResponse from urllib3.util.timeout import Timeout from urllib3.packages.six.moves.http_cli...
POOL_SIZE
modified
0189e9abfc0ce6dd5992b2a9a578bb975fcc4bbe4eab320e66495dd4120c91d9
assert|_test|from __future__ import absolute_import import pytest from urllib3.connectionpool import ( connection_from_url, HTTPConnection, HTTPConnectionPool, HTTPSConnectionPool, ) from urllib3.response import httplib, HTTPResponse from urllib3.util.timeout import Timeout from urllib3.packages.six.moves.http_client i...
POOL_SIZE
201
16
urllib3/urllib3
train
234
df5c8379e7cb6e28ffd98117127baedcdb772e45
train
test/test_connectionpool.py
train
urllib3/urllib3:test/test_connectionpool.py
291
12
assert
test_absolute_url
from __future__ import absolute_import import pytest from urllib3.connectionpool import ( connection_from_url, HTTPConnection, HTTPConnectionPool, HTTPSConnectionPool, ) from urllib3.response import httplib, HTTPResponse from urllib3.util.timeout import Timeout from urllib3.packages.six.moves.http_cli...
c._absolute_url('path?query=foo')
modified
3c1703efdf70c0a3ffd276516376706c37f77f6876a81d5bbde60442c22f8241
assert|test_absolute_url|from __future__ import absolute_import import pytest from urllib3.connectionpool import ( connection_from_url, HTTPConnection, HTTPConnectionPool, HTTPSConnectionPool, ) from urllib3.response import httplib, HTTPResponse from urllib3.util.timeout import Timeout from urllib3.packages.six.moves.h...
c._absolute_url('path?query=foo')
290
12
urllib3/urllib3
train
234
df5c8379e7cb6e28ffd98117127baedcdb772e45
train
test/with_dummyserver/test_https.py
train
urllib3/urllib3:test/with_dummyserver/test_https.py
68
8
self.assertEqual
test_set_ssl_version_to_tlsv1
import datetime import logging import ssl import sys import unittest import warnings import mock from nose.plugins.skip import SkipTest from dummyserver.testcase import ( HTTPSDummyServerTestCase, IPV6HTTPSDummyServerTestCase ) from dummyserver.server import (DEFAULT_CA, DEFAULT_CA_BAD, DEFAULT_CERTS, ...
r.data)
modified
5ad6391b4ae6b239c9e79d4021de108d7ab5b02f79228ec05fa1dbcdce838d7a
self.assertEqual|test_set_ssl_version_to_tlsv1|import datetime import logging import ssl import sys import unittest import warnings import mock from nose.plugins.skip import SkipTest from dummyserver.testcase import ( HTTPSDummyServerTestCase, IPV6HTTPSDummyServerTestCase ) from dummyserver.server import (DEFAULT_CA, D...
r.data)
67
8
urllib3/urllib3
train
234
df5c8379e7cb6e28ffd98117127baedcdb772e45
train
test/with_dummyserver/test_https.py
train
urllib3/urllib3:test/with_dummyserver/test_https.py
148
16
self.assertEqual
test_context_combines_with_ca_certs
import datetime import logging import ssl import sys import unittest import warnings import mock from nose.plugins.skip import SkipTest from dummyserver.testcase import ( HTTPSDummyServerTestCase, IPV6HTTPSDummyServerTestCase ) from dummyserver.server import (DEFAULT_CA, DEFAULT_CA_BAD, DEFAULT_CERTS, ...
InsecurePlatformWarning)
modified
b1561b990693718383b344cba96ef2621fb4029daa49dced27cf38d35abbd71a
self.assertEqual|test_context_combines_with_ca_certs|import datetime import logging import ssl import sys import unittest import warnings import mock from nose.plugins.skip import SkipTest from dummyserver.testcase import ( HTTPSDummyServerTestCase, IPV6HTTPSDummyServerTestCase ) from dummyserver.server import (DEFAULT...
InsecurePlatformWarning)
147
16
urllib3/urllib3
train
234
df5c8379e7cb6e28ffd98117127baedcdb772e45
train
test/with_dummyserver/test_proxy_poolmanager.py
train
urllib3/urllib3:test/with_dummyserver/test_proxy_poolmanager.py
127
8
self.assertEqual
test_redirect
import json import socket import unittest from nose.tools import timed from dummyserver.testcase import HTTPDummyProxyTestCase, IPv6HTTPDummyProxyTestCase from dummyserver.server import ( DEFAULT_CA, DEFAULT_CA_BAD, get_unreachable_address) from .. import TARPIT_HOST, requires_network from urllib3._collections i...
b'Dummy server!')
modified
b1c5a5e9ac47ae31b6c45b4ba9786ca7dd84a76b6c59f0d2ca4e630b9494db6e
self.assertEqual|test_redirect|import json import socket import unittest from nose.tools import timed from dummyserver.testcase import HTTPDummyProxyTestCase, IPv6HTTPDummyProxyTestCase from dummyserver.server import ( DEFAULT_CA, DEFAULT_CA_BAD, get_unreachable_address) from .. import TARPIT_HOST, requires_network fro...
b'Dummy server!')
125
8
urllib3/urllib3
train
234
df5c8379e7cb6e28ffd98117127baedcdb772e45
train
test/with_dummyserver/test_proxy_poolmanager.py
train
urllib3/urllib3:test/with_dummyserver/test_proxy_poolmanager.py
254
8
self.assertEqual
test_headerdict
import json import socket import unittest from nose.tools import timed from dummyserver.testcase import HTTPDummyProxyTestCase, IPv6HTTPDummyProxyTestCase from dummyserver.server import ( DEFAULT_CA, DEFAULT_CA_BAD, get_unreachable_address) from .. import TARPIT_HOST, requires_network from urllib3._collections i...
'quux')
modified
05c0107c3a77da2f56db7d7c3d57941cbdaf6749ae9b8f81e8a8b7ec258fe4bd
self.assertEqual|test_headerdict|import json import socket import unittest from nose.tools import timed from dummyserver.testcase import HTTPDummyProxyTestCase, IPv6HTTPDummyProxyTestCase from dummyserver.server import ( DEFAULT_CA, DEFAULT_CA_BAD, get_unreachable_address) from .. import TARPIT_HOST, requires_network f...
'quux')
252
8
urllib3/urllib3
train
234
df5c8379e7cb6e28ffd98117127baedcdb772e45
train
test/with_dummyserver/test_socketlevel.py
train
urllib3/urllib3:test/with_dummyserver/test_socketlevel.py
1,093
8
self.assertRaises
test_unknown_protocol
# TODO: Break this module up into pieces. Maybe group by functionality tested # rather than the socket level-ness of it. from urllib3 import HTTPConnectionPool, HTTPSConnectionPool from urllib3.poolmanager import proxy_from_url from urllib3.exceptions import ( MaxRetryError, ProxyError, ReadTim...
ProtocolError)
added
4c9126914cdb9b920e29cf793408e8777cf2b77aa1ddc78d25df1ffa54165ad6
self.assertRaises|test_unknown_protocol|# TODO: Break this module up into pieces. Maybe group by functionality tested # rather than the socket level-ness of it. from urllib3 import HTTPConnectionPool, HTTPSConnectionPool from urllib3.poolmanager import proxy_from_url from urllib3.exceptions import ( MaxRetryError, Prox...
null
null
null
urllib3/urllib3
train
234
df5c8379e7cb6e28ffd98117127baedcdb772e45
train
test/with_dummyserver/test_socketlevel.py
train
urllib3/urllib3:test/with_dummyserver/test_socketlevel.py
1,277
8
self.assertEqual
test_chunked_head_response_does_not_hang
# TODO: Break this module up into pieces. Maybe group by functionality tested # rather than the socket level-ness of it. from urllib3 import HTTPConnectionPool, HTTPSConnectionPool from urllib3.poolmanager import proxy_from_url from urllib3.exceptions import ( MaxRetryError, ProxyError, ReadTim...
list(r.stream()))
added
a61cc00d856e3584ecb033a77305308b56e3fd4461bd4da40aa5102331b468c9
self.assertEqual|test_chunked_head_response_does_not_hang|# TODO: Break this module up into pieces. Maybe group by functionality tested # rather than the socket level-ness of it. from urllib3 import HTTPConnectionPool, HTTPSConnectionPool from urllib3.poolmanager import proxy_from_url from urllib3.exceptions import ( M...
null
null
null
urllib3/urllib3
train
235
6d1050064cc115eb781f094a7db51575a6d654e0
train
test/test_exceptions.py
val
urllib3/urllib3:test/test_exceptions.py
30
8
assert
test_exceptions
import pickle import pytest from urllib3.exceptions import (HTTPError, MaxRetryError, LocationParseError, ClosedPoolError, EmptyPoolError, HostChangedError, ReadTimeoutError, ConnectTimeoutError, HeaderParsingError) from u...
isinstance(result, type(exception))
added
6e2ca85f601af4b01a2007092901b6eb3025f69639871d1ccda87ddb5b088924
assert|test_exceptions|import pickle import pytest from urllib3.exceptions import (HTTPError, MaxRetryError, LocationParseError, ClosedPoolError, EmptyPoolError, HostChangedError, ReadTimeoutError, ConnectTimeoutError, HeaderParsingError) from urllib3.connectionpool import HTTPConnectionPool class TestPickle(object): @...
null
null
null
urllib3/urllib3
train
235
6d1050064cc115eb781f094a7db51575a6d654e0
train
test/test_exceptions.py
val
urllib3/urllib3:test/test_exceptions.py
37
8
assert
test_header_parsing_errors
import pickle import pytest from urllib3.exceptions import (HTTPError, MaxRetryError, LocationParseError, ClosedPoolError, EmptyPoolError, HostChangedError, ReadTimeoutError, ConnectTimeoutError, HeaderParsingError) from u...
str(hpe)
added
f324d94af90f311b997d7adccdbae8b8d81449c3553b165253980a8a79a6faf9
assert|test_header_parsing_errors|import pickle import pytest from urllib3.exceptions import (HTTPError, MaxRetryError, LocationParseError, ClosedPoolError, EmptyPoolError, HostChangedError, ReadTimeoutError, ConnectTimeoutError, HeaderParsingError) from urllib3.connectionpool import HTTPConnectionPool class TestPickle...
null
null
null
urllib3/urllib3
train
235
6d1050064cc115eb781f094a7db51575a6d654e0
train
test/test_exceptions.py
val
urllib3/urllib3:test/test_exceptions.py
38
8
assert
test_header_parsing_errors
import pickle import pytest from urllib3.exceptions import (HTTPError, MaxRetryError, LocationParseError, ClosedPoolError, EmptyPoolError, HostChangedError, ReadTimeoutError, ConnectTimeoutError, HeaderParsingError) from u...
str(hpe)
added
2b27014f35a6e5ca95231978b1da455c473a4aa110a5e865bca683af8db48ba0
assert|test_header_parsing_errors|import pickle import pytest from urllib3.exceptions import (HTTPError, MaxRetryError, LocationParseError, ClosedPoolError, EmptyPoolError, HostChangedError, ReadTimeoutError, ConnectTimeoutError, HeaderParsingError) from urllib3.connectionpool import HTTPConnectionPool class TestPickle...
null
null
null
urllib3/urllib3
train
236
339cf6564b8aa6b396545000d8dbcc7492846aa0
train
test/test_util.py
train
urllib3/urllib3:test/test_util.py
274
13
pytest.raises
test_rewind_body_failed_tell
import hashlib import warnings import logging import io import ssl import socket from itertools import chain from mock import patch, Mock import pytest from urllib3 import add_stderr_logger, disable_warnings from urllib3.util.request import make_headers, rewind_body, _FAILEDTELL from urllib3.util.retry import Retry f...
UnrewindableBodyError)
added
df792585c13d15f184d4798f595acfe17583ccff26e69cbbef1480e482070046
pytest.raises|test_rewind_body_failed_tell|import hashlib import warnings import logging import io import ssl import socket from itertools import chain from mock import patch, Mock import pytest from urllib3 import add_stderr_logger, disable_warnings from urllib3.util.request import make_headers, rewind_body, _FAILEDTE...
null
null
null
urllib3/urllib3
train
236
339cf6564b8aa6b396545000d8dbcc7492846aa0
train
test/test_util.py
train
urllib3/urllib3:test/test_util.py
394
13
pytest.raises
test_timeout_elapsed
import hashlib import warnings import logging import io import ssl import socket from itertools import chain from mock import patch, Mock import pytest from urllib3 import add_stderr_logger, disable_warnings from urllib3.util.request import make_headers, rewind_body, _FAILEDTELL from urllib3.util.retry import Retry f...
TimeoutStateError)
added
0b23a733773dd421a234af815f33b0330d8cd0481410d1d7b16f78a7a38064f8
pytest.raises|test_timeout_elapsed|import hashlib import warnings import logging import io import ssl import socket from itertools import chain from mock import patch, Mock import pytest from urllib3 import add_stderr_logger, disable_warnings from urllib3.util.request import make_headers, rewind_body, _FAILEDTELL from ...
null
null
null
urllib3/urllib3
train
236
339cf6564b8aa6b396545000d8dbcc7492846aa0
train
test/test_util.py
train
urllib3/urllib3:test/test_util.py
525
12
assert
test_has_ipv6_disabled_on_compile
import hashlib import warnings import logging import io import ssl import socket from itertools import chain from mock import patch, Mock import pytest from urllib3 import add_stderr_logger, disable_warnings from urllib3.util.request import make_headers, rewind_body, _FAILEDTELL from urllib3.util.retry import Retry f...
not _has_ipv6('::1')
added
09e484722c91e63c48d66c87b05fcff12cc664a2ed18a483d3d9dae885187c88
assert|test_has_ipv6_disabled_on_compile|import hashlib import warnings import logging import io import ssl import socket from itertools import chain from mock import patch, Mock import pytest from urllib3 import add_stderr_logger, disable_warnings from urllib3.util.request import make_headers, rewind_body, _FAILEDTELL...
null
null
null
urllib3/urllib3
train
236
339cf6564b8aa6b396545000d8dbcc7492846aa0
train
test/test_util.py
train
urllib3/urllib3:test/test_util.py
557
13
pytest.raises
test_parse_retry_after_invalid
import hashlib import warnings import logging import io import ssl import socket from itertools import chain from mock import patch, Mock import pytest from urllib3 import add_stderr_logger, disable_warnings from urllib3.util.request import make_headers, rewind_body, _FAILEDTELL from urllib3.util.retry import Retry f...
InvalidHeader)
added
f821f0c2e8d8746f960e14e90f160c2e0baa7e90060eb181b1869f129a733ae0
pytest.raises|test_parse_retry_after_invalid|import hashlib import warnings import logging import io import ssl import socket from itertools import chain from mock import patch, Mock import pytest from urllib3 import add_stderr_logger, disable_warnings from urllib3.util.request import make_headers, rewind_body, _FAILED...
null
null
null
urllib3/urllib3
train
237
db78375c048092f217b1fc122fb36f013da8e6cb
train
test/contrib/test_socks.py
train
urllib3/urllib3:test/contrib/test_socks.py
351
8
self.assertRaises
test_proxy_rejection
import threading import socket from urllib3.contrib import socks from urllib3.exceptions import ConnectTimeoutError, NewConnectionError from dummyserver.server import DEFAULT_CERTS from dummyserver.testcase import IPV4SocketDummyServerTestCase from nose.plugins.skip import SkipTest try: import ssl from urll...
NewConnectionError)
modified
08e52b4b67734c342f91adf1a4aef0105a0bc72e002e0b4a74919f59c9c9e4c1
self.assertRaises|test_proxy_rejection|import threading import socket from urllib3.contrib import socks from urllib3.exceptions import ConnectTimeoutError, NewConnectionError from dummyserver.server import DEFAULT_CERTS from dummyserver.testcase import IPV4SocketDummyServerTestCase from nose.plugins.skip import SkipTes...
NewConnectionError)
350
8
urllib3/urllib3
train
237
db78375c048092f217b1fc122fb36f013da8e6cb
train
test/contrib/test_socks.py
train
urllib3/urllib3:test/contrib/test_socks.py
626
12
self.assertTrue
test_socks_with_invalid_username
import threading import socket from urllib3.contrib import socks from urllib3.exceptions import ConnectTimeoutError, NewConnectionError from dummyserver.server import DEFAULT_CERTS from dummyserver.testcase import IPV4SocketDummyServerTestCase from nose.plugins.skip import SkipTest try: import ssl from urll...
"different user-ids" in str(e))
modified
5e4a76ed716a9f1d22008ddaa1f659b2bced1454da0c93b934134d4abfba9d93
self.assertTrue|test_socks_with_invalid_username|import threading import socket from urllib3.contrib import socks from urllib3.exceptions import ConnectTimeoutError, NewConnectionError from dummyserver.server import DEFAULT_CERTS from dummyserver.testcase import IPV4SocketDummyServerTestCase from nose.plugins.skip impo...
"different user-ids" in str(e))
624
12
urllib3/urllib3
train
237
db78375c048092f217b1fc122fb36f013da8e6cb
train
test/test_response.py
train
urllib3/urllib3:test/test_response.py
285
8
self.assertRaises
test_streaming_tell
import socket import sys from io import BytesIO, BufferedReader from urllib3.response import HTTPResponse from urllib3.exceptions import ( DecodeError, ResponseNotChunked, ProtocolError, InvalidHeader ) from urllib3.packages.six.moves import http_client as httplib from urllib3.util.retry import Retry from urllib3...
StopIteration)
added
585472895a3b59c13761f71bfbd8ebb5edfced2d9088fd16eff48d1f80eda8bd
self.assertRaises|test_streaming_tell|import socket import sys from io import BytesIO, BufferedReader from urllib3.response import HTTPResponse from urllib3.exceptions import ( DecodeError, ResponseNotChunked, ProtocolError, InvalidHeader ) from urllib3.packages.six.moves import http_client as httplib from urllib3.util...
null
null
null
urllib3/urllib3
train
237
db78375c048092f217b1fc122fb36f013da8e6cb
train
test/test_response.py
train
urllib3/urllib3:test/test_response.py
451
8
self.assertRaises
test_length_with_multiple_content_lengths
import socket import sys from io import BytesIO, BufferedReader from urllib3.response import HTTPResponse from urllib3.exceptions import ( DecodeError, ResponseNotChunked, ProtocolError, InvalidHeader ) from urllib3.packages.six.moves import http_client as httplib from urllib3.util.retry import Retry from urllib3...
InvalidHeader)
added
1982a8d9fa7903c46c6034af50785b34599ff36b2f99e43f77072ba49b205099
self.assertRaises|test_length_with_multiple_content_lengths|import socket import sys from io import BytesIO, BufferedReader from urllib3.response import HTTPResponse from urllib3.exceptions import ( DecodeError, ResponseNotChunked, ProtocolError, InvalidHeader ) from urllib3.packages.six.moves import http_client as htt...
null
null
null
urllib3/urllib3
train
237
db78375c048092f217b1fc122fb36f013da8e6cb
train
test/test_response.py
train
urllib3/urllib3:test/test_response.py
564
12
self.assertListEqual
test_mock_transfer_encoding_chunked_unlmtd_read
import socket import sys from io import BytesIO, BufferedReader from urllib3.response import HTTPResponse from urllib3.exceptions import ( DecodeError, ResponseNotChunked, ProtocolError, InvalidHeader ) from urllib3.packages.six.moves import http_client as httplib from urllib3.util.retry import Retry from urllib3...
list(resp.read_chunked()))
added
6b7eb9a9026b505fb2b6f35c387bfa2c1df62d5594bdd227f8188b9c9dad1ff2
self.assertListEqual|test_mock_transfer_encoding_chunked_unlmtd_read|import socket import sys from io import BytesIO, BufferedReader from urllib3.response import HTTPResponse from urllib3.exceptions import ( DecodeError, ResponseNotChunked, ProtocolError, InvalidHeader ) from urllib3.packages.six.moves import http_clie...
null
null
null
urllib3/urllib3
train
237
db78375c048092f217b1fc122fb36f013da8e6cb
train
test/with_dummyserver/test_https.py
train
urllib3/urllib3:test/with_dummyserver/test_https.py
529
8
self.assertIsInstance
test_discards_connection_on_sslerror
import datetime import logging import ssl import sys import unittest import warnings import mock from nose.plugins.skip import SkipTest from dummyserver.testcase import ( HTTPSDummyServerTestCase, IPV6HTTPSDummyServerTestCase ) from dummyserver.server import (DEFAULT_CA, DEFAULT_CA_BAD, DEFAULT_CERTS, ...
SSLError)
modified
4aa2cacdbfeacd9f76d9457239f6ded076667e3ff64075e4bd1e5ecd84038a8c
self.assertIsInstance|test_discards_connection_on_sslerror|import datetime import logging import ssl import sys import unittest import warnings import mock from nose.plugins.skip import SkipTest from dummyserver.testcase import ( HTTPSDummyServerTestCase, IPV6HTTPSDummyServerTestCase ) from dummyserver.server import (D...
SSLError)
528
8
urllib3/urllib3
train
237
db78375c048092f217b1fc122fb36f013da8e6cb
train
test/with_dummyserver/test_https.py
train
urllib3/urllib3:test/with_dummyserver/test_https.py
536
8
self.assertEqual
test_set_cert_default_cert_required
import datetime import logging import ssl import sys import unittest import warnings import mock from nose.plugins.skip import SkipTest from dummyserver.testcase import ( HTTPSDummyServerTestCase, IPV6HTTPSDummyServerTestCase ) from dummyserver.server import (DEFAULT_CA, DEFAULT_CA_BAD, DEFAULT_CERTS, ...
'CERT_REQUIRED')
modified
f7393ca554dbc9311c29cf49dde4c120e46377f78905437f9001fb619dec734d
self.assertEqual|test_set_cert_default_cert_required|import datetime import logging import ssl import sys import unittest import warnings import mock from nose.plugins.skip import SkipTest from dummyserver.testcase import ( HTTPSDummyServerTestCase, IPV6HTTPSDummyServerTestCase ) from dummyserver.server import (DEFAULT...
'CERT_REQUIRED')
535
8
urllib3/urllib3
train
237
db78375c048092f217b1fc122fb36f013da8e6cb
train
test/with_dummyserver/test_https.py
train
urllib3/urllib3:test/with_dummyserver/test_https.py
552
12
self.assertTrue
test_warning_for_certs_without_a_san
import datetime import logging import ssl import sys import unittest import warnings import mock from nose.plugins.skip import SkipTest from dummyserver.testcase import ( HTTPSDummyServerTestCase, IPV6HTTPSDummyServerTestCase ) from dummyserver.server import (DEFAULT_CA, DEFAULT_CA_BAD, DEFAULT_CERTS, ...
warn.called)
modified
0d82f39b317da007e2f37921de471e99a3b1ca910b5b07dbcb38accb4b9da199
self.assertTrue|test_warning_for_certs_without_a_san|import datetime import logging import ssl import sys import unittest import warnings import mock from nose.plugins.skip import SkipTest from dummyserver.testcase import ( HTTPSDummyServerTestCase, IPV6HTTPSDummyServerTestCase ) from dummyserver.server import (DEFAULT...
warn.called)
551
12
urllib3/urllib3
train
238
5082710642037f9f312dcd0ca3dcae85bd586971
train
test/test_retry.py
train
urllib3/urllib3:test/test_retry.py
40
13
pytest.raises
test_retry_higher_total_loses
import pytest from urllib3.response import HTTPResponse from urllib3.packages.six.moves import xrange from urllib3.util.retry import Retry, RequestHistory from urllib3.exceptions import ( ConnectTimeoutError, MaxRetryError, ReadTimeoutError, ResponseError, ) class TestRetry(object): def test_str...
MaxRetryError)
added
d983b9e136a47f5cc7d91e6d6d47d92b05dd66eaeaed78dda7246505c5313dfd
pytest.raises|test_retry_higher_total_loses|import pytest from urllib3.response import HTTPResponse from urllib3.packages.six.moves import xrange from urllib3.util.retry import Retry, RequestHistory from urllib3.exceptions import ( ConnectTimeoutError, MaxRetryError, ReadTimeoutError, ResponseError, ) class TestRetry(o...
null
null
null
urllib3/urllib3
train
238
5082710642037f9f312dcd0ca3dcae85bd586971
train
test/test_retry.py
train
urllib3/urllib3:test/test_retry.py
49
13
pytest.raises
test_retry_higher_total_loses_vs_read
import pytest from urllib3.response import HTTPResponse from urllib3.packages.six.moves import xrange from urllib3.util.retry import Retry, RequestHistory from urllib3.exceptions import ( ConnectTimeoutError, MaxRetryError, ReadTimeoutError, ResponseError, ) class TestRetry(object): def test_str...
MaxRetryError)
added
06ab404f74854ea81b7cdcc0fb6156b33153e16209382b71d213d20a63af3cbd
pytest.raises|test_retry_higher_total_loses_vs_read|import pytest from urllib3.response import HTTPResponse from urllib3.packages.six.moves import xrange from urllib3.util.retry import Retry, RequestHistory from urllib3.exceptions import ( ConnectTimeoutError, MaxRetryError, ReadTimeoutError, ResponseError, ) class Tes...
null
null
null
urllib3/urllib3
train
238
5082710642037f9f312dcd0ca3dcae85bd586971
train
test/test_retry.py
train
urllib3/urllib3:test/test_retry.py
96
8
assert
test_retry_read_zero
import pytest from urllib3.response import HTTPResponse from urllib3.packages.six.moves import xrange from urllib3.util.retry import Retry, RequestHistory from urllib3.exceptions import ( ConnectTimeoutError, MaxRetryError, ReadTimeoutError, ResponseError, ) class TestRetry(object): def test_str...
error
added
5191b22d9d0cee2a9792c7fa0370a9b2ad6b13e0cd10505836635720e4f864a4
assert|test_retry_read_zero|import pytest from urllib3.response import HTTPResponse from urllib3.packages.six.moves import xrange from urllib3.util.retry import Retry, RequestHistory from urllib3.exceptions import ( ConnectTimeoutError, MaxRetryError, ReadTimeoutError, ResponseError, ) class TestRetry(object): def test...
null
null
null
urllib3/urllib3
train
238
5082710642037f9f312dcd0ca3dcae85bd586971
train
test/test_retry.py
train
urllib3/urllib3:test/test_retry.py
224
8
assert
test_error_message
import pytest from urllib3.response import HTTPResponse from urllib3.packages.six.moves import xrange from urllib3.util.retry import Retry, RequestHistory from urllib3.exceptions import ( ConnectTimeoutError, MaxRetryError, ReadTimeoutError, ResponseError, ) class TestRetry(object): def test_str...
'conntimeout'
added
3c9d576db4f11415d4960bbcd0e51c0856a317429b3b7d768ce266ee973b0377
assert|test_error_message|import pytest from urllib3.response import HTTPResponse from urllib3.packages.six.moves import xrange from urllib3.util.retry import Retry, RequestHistory from urllib3.exceptions import ( ConnectTimeoutError, MaxRetryError, ReadTimeoutError, ResponseError, ) class TestRetry(object): def test_s...
null
null
null
urllib3/urllib3
train
239
d74df4af794b28db61edbbacec688463bbabdd43
train
test/test_response.py
train
urllib3/urllib3:test/test_response.py
113
8
assert
test_decode_deflate_case_insensitve
import socket from io import BytesIO, BufferedReader import pytest from urllib3.response import HTTPResponse from urllib3.exceptions import ( DecodeError, ResponseNotChunked, ProtocolError, InvalidHeader ) from urllib3.packages.six.moves import http_client as httplib from urllib3.util.retry import Retry from url...
b'foo'
added
e93578657040fdbce361c64fa4e322a8d46597bd0c1ac6aeabd3e8bf341d58d8
assert|test_decode_deflate_case_insensitve|import socket from io import BytesIO, BufferedReader import pytest from urllib3.response import HTTPResponse from urllib3.exceptions import ( DecodeError, ResponseNotChunked, ProtocolError, InvalidHeader ) from urllib3.packages.six.moves import http_client as httplib from urll...
null
null
null
urllib3/urllib3
train
239
d74df4af794b28db61edbbacec688463bbabdd43
train
test/test_response.py
train
urllib3/urllib3:test/test_response.py
221
16
assert
test_io_closed_consistently
import socket from io import BytesIO, BufferedReader import pytest from urllib3.response import HTTPResponse from urllib3.exceptions import ( DecodeError, ResponseNotChunked, ProtocolError, InvalidHeader ) from urllib3.packages.six.moves import http_client as httplib from urllib3.util.retry import Retry from url...
is_fp_closed(resp._fp)
added
99426a957ee7cb88a5d1802c2b8477b15476bebac41b31adac9f54ca32a70e5a
assert|test_io_closed_consistently|import socket from io import BytesIO, BufferedReader import pytest from urllib3.response import HTTPResponse from urllib3.exceptions import ( DecodeError, ResponseNotChunked, ProtocolError, InvalidHeader ) from urllib3.packages.six.moves import http_client as httplib from urllib3.util...
null
null
null
urllib3/urllib3
train
239
d74df4af794b28db61edbbacec688463bbabdd43
train
test/test_response.py
train
urllib3/urllib3:test/test_response.py
304
8
assert
test_gzipped_streaming
import socket from io import BytesIO, BufferedReader import pytest from urllib3.response import HTTPResponse from urllib3.exceptions import ( DecodeError, ResponseNotChunked, ProtocolError, InvalidHeader ) from urllib3.packages.six.moves import http_client as httplib from urllib3.util.retry import Retry from url...
b'f'
added
b2386928cdfee4c896ee8cacfadc157de3444a64db57ecae97ec1cf704a5e7ed
assert|test_gzipped_streaming|import socket from io import BytesIO, BufferedReader import pytest from urllib3.response import HTTPResponse from urllib3.exceptions import ( DecodeError, ResponseNotChunked, ProtocolError, InvalidHeader ) from urllib3.packages.six.moves import http_client as httplib from urllib3.util.retr...
null
null
null
urllib3/urllib3
train
239
d74df4af794b28db61edbbacec688463bbabdd43
train
test/test_response.py
train
urllib3/urllib3:test/test_response.py
569
8
assert
test_mock_transfer_encoding_chunked_unlmtd_read
import socket from io import BytesIO, BufferedReader import pytest from urllib3.response import HTTPResponse from urllib3.exceptions import ( DecodeError, ResponseNotChunked, ProtocolError, InvalidHeader ) from urllib3.packages.six.moves import http_client as httplib from urllib3.util.retry import Retry from url...
list(resp.read_chunked())
added
c92401134e9ceb99cabb94a15af48c80bc4e5e3ca3ddd91f825a0eff76b520eb
assert|test_mock_transfer_encoding_chunked_unlmtd_read|import socket from io import BytesIO, BufferedReader import pytest from urllib3.response import HTTPResponse from urllib3.exceptions import ( DecodeError, ResponseNotChunked, ProtocolError, InvalidHeader ) from urllib3.packages.six.moves import http_client as httpl...
null
null
null
urllib3/urllib3
train
240
50294125617cc456a5c1d9df0447c5d8095440fc
train
test/appengine/test_gae_manager.py
test
urllib3/urllib3:test/appengine/test_gae_manager.py
51
8
self.assertRaises
test_exceptions
import dummyserver.testcase import pytest from urllib3.contrib import appengine import urllib3.exceptions import urllib3.util.url import urllib3.util.retry from test.with_dummyserver import test_connectionpool # This class is used so we can re-use the tests from the connection pool. # It proxies all requests to the...
urllib3.exceptions.TimeoutError)
added
7d9583f3b88a843c306ba0b5136873143ee06ca81d55efa8cafffa835093ad97
self.assertRaises|test_exceptions|import dummyserver.testcase import pytest from urllib3.contrib import appengine import urllib3.exceptions import urllib3.util.url import urllib3.util.retry from test.with_dummyserver import test_connectionpool # This class is used so we can re-use the tests from the connection pool. # ...
null
null
null
urllib3/urllib3
train
240
50294125617cc456a5c1d9df0447c5d8095440fc
train
test/appengine/test_gae_manager.py
test
urllib3/urllib3:test/appengine/test_gae_manager.py
66
8
self.assertRaises
test_exceptions
import dummyserver.testcase import pytest from urllib3.contrib import appengine import urllib3.exceptions import urllib3.util.url import urllib3.util.retry from test.with_dummyserver import test_connectionpool # This class is used so we can re-use the tests from the connection pool. # It proxies all requests to the...
urllib3.exceptions.ProtocolError)
added
41492a6922ac7eea8a17127902f36c0676253a5cec53489899f347b9940e836b
self.assertRaises|test_exceptions|import dummyserver.testcase import pytest from urllib3.contrib import appengine import urllib3.exceptions import urllib3.util.url import urllib3.util.retry from test.with_dummyserver import test_connectionpool # This class is used so we can re-use the tests from the connection pool. # ...
null
null
null
urllib3/urllib3
train
240
50294125617cc456a5c1d9df0447c5d8095440fc
train
test/appengine/test_gae_manager.py
test
urllib3/urllib3:test/appengine/test_gae_manager.py
82
8
self.assertRaises
test_exceptions
import dummyserver.testcase import pytest from urllib3.contrib import appengine import urllib3.exceptions import urllib3.util.url import urllib3.util.retry from test.with_dummyserver import test_connectionpool # This class is used so we can re-use the tests from the connection pool. # It proxies all requests to the...
appengine.AppEnginePlatformError)
added
0aad6b55c05c276fdd2bfec831ae3517c79c118dc6b5c9dca2dc139ebe94c33e
self.assertRaises|test_exceptions|import dummyserver.testcase import pytest from urllib3.contrib import appengine import urllib3.exceptions import urllib3.util.url import urllib3.util.retry from test.with_dummyserver import test_connectionpool # This class is used so we can re-use the tests from the connection pool. # ...
null
null
null
urllib3/urllib3
train
240
50294125617cc456a5c1d9df0447c5d8095440fc
train
test/appengine/test_gae_manager.py
test
urllib3/urllib3:test/appengine/test_gae_manager.py
166
8
self.assertEqual
test_retry_return_in_response
import dummyserver.testcase import pytest from urllib3.contrib import appengine import urllib3.exceptions import urllib3.util.url import urllib3.util.retry from test.with_dummyserver import test_connectionpool # This class is used so we can re-use the tests from the connection pool. # It proxies all requests to the...
(urllib3.util.retry.RequestHistory( 'GET', self.pool._absolute_url('/successful_retry'), None, 418, None),))
added
5e03e2772483a1b7be35d1f8f648c191230909972a66d0f04aa61e848a84e3ee
self.assertEqual|test_retry_return_in_response|import dummyserver.testcase import pytest from urllib3.contrib import appengine import urllib3.exceptions import urllib3.util.url import urllib3.util.retry from test.with_dummyserver import test_connectionpool # This class is used so we can re-use the tests from the connec...
null
null
null
urllib3/urllib3
train
240
50294125617cc456a5c1d9df0447c5d8095440fc
train
test/appengine/test_urlfetch.py
train
urllib3/urllib3:test/appengine/test_urlfetch.py
45
12
self.assertEqual
test_urlfetch_called_with_http
"""These tests ensure that when running in App Engine standard with the App Engine sandbox enabled that urllib3 appropriately uses the App Engine-patched version of httplib to make requests.""" import httplib import StringIO import unittest from mock import patch import pytest from ..test_no_ssl import TestWithoutSS...
r.data)
added
1b5c7c744015b843b799296b1f4984a3cfa3aff92df50a466e765bb4370167d1
self.assertEqual|test_urlfetch_called_with_http|"""These tests ensure that when running in App Engine standard with the App Engine sandbox enabled that urllib3 appropriately uses the App Engine-patched version of httplib to make requests.""" import httplib import StringIO import unittest from mock import patch import p...
null
null
null
urllib3/urllib3
train
240
50294125617cc456a5c1d9df0447c5d8095440fc
train
test/appengine/test_urlfetch.py
train
urllib3/urllib3:test/appengine/test_urlfetch.py
72
12
self.assertEqual
test_urlfetch_called_with_https
"""These tests ensure that when running in App Engine standard with the App Engine sandbox enabled that urllib3 appropriately uses the App Engine-patched version of httplib to make requests.""" import httplib import StringIO import unittest from mock import patch import pytest from ..test_no_ssl import TestWithoutSS...
r.data)
added
8281735460e9a3952034a752a332ef443aae68d6f3fcab5a8e92405cb1665157
self.assertEqual|test_urlfetch_called_with_https|"""These tests ensure that when running in App Engine standard with the App Engine sandbox enabled that urllib3 appropriately uses the App Engine-patched version of httplib to make requests.""" import httplib import StringIO import unittest from mock import patch import ...
null
null
null
urllib3/urllib3
train
241
e478d6a719f8bcd4a0910568654c183ff97031f1
train
test/test_queue_monkeypatch.py
train
urllib3/urllib3:test/test_queue_monkeypatch.py
28
21
pytest.raises
test_queue_monkeypatching
from __future__ import absolute_import import mock import pytest from urllib3 import HTTPConnectionPool from urllib3.exceptions import EmptyPoolError from urllib3.packages.six.moves import queue class BadError(Exception): """ This should not be raised. """ pass class TestMonkeypatchResistance(obj...
EmptyPoolError)
added
897bf4e398677c34685531d30367087cf77e77eaaa1d3c8a4d5b155278c769da
pytest.raises|test_queue_monkeypatching|from __future__ import absolute_import import mock import pytest from urllib3 import HTTPConnectionPool from urllib3.exceptions import EmptyPoolError from urllib3.packages.six.moves import queue class BadError(Exception): """ This should not be raised. """ pass class TestMonkeypa...
null
null
null
urllib3/urllib3
train
242
1191719a9ce99e3b87f280f92ffede99929bc9dd
train
test/with_dummyserver/test_socketlevel.py
train
urllib3/urllib3:test/with_dummyserver/test_socketlevel.py
1,068
8
self.assertIsInstance
test_ssl_failed_fingerprint_verification
# TODO: Break this module up into pieces. Maybe group by functionality tested # rather than the socket level-ness of it. from urllib3 import HTTPConnectionPool, HTTPSConnectionPool from urllib3.poolmanager import proxy_from_url from urllib3.exceptions import ( MaxRetryError, ProxyError, ReadTim...
SSLError)
added
14d302ee5e2952ce041f58301700de580f39b2464be4a790e53e50b5cc4e0847
self.assertIsInstance|test_ssl_failed_fingerprint_verification|# TODO: Break this module up into pieces. Maybe group by functionality tested # rather than the socket level-ness of it. from urllib3 import HTTPConnectionPool, HTTPSConnectionPool from urllib3.poolmanager import proxy_from_url from urllib3.exceptions impor...
null
null
null
urllib3/urllib3
train
242
1191719a9ce99e3b87f280f92ffede99929bc9dd
train
test/with_dummyserver/test_socketlevel.py
train
urllib3/urllib3:test/with_dummyserver/test_socketlevel.py
1,188
8
self.assertEqual
test_headers_are_sent_with_the_original_case
# TODO: Break this module up into pieces. Maybe group by functionality tested # rather than the socket level-ness of it. from urllib3 import HTTPConnectionPool, HTTPSConnectionPool from urllib3.poolmanager import proxy_from_url from urllib3.exceptions import ( MaxRetryError, ProxyError, ReadTim...
parsed_headers)
added
1bacf6e3256b2bbf23f8f5a17edb4f2ddf00ee57dd9b06c1a97f60d85aff235b
self.assertEqual|test_headers_are_sent_with_the_original_case|# TODO: Break this module up into pieces. Maybe group by functionality tested # rather than the socket level-ness of it. from urllib3 import HTTPConnectionPool, HTTPSConnectionPool from urllib3.poolmanager import proxy_from_url from urllib3.exceptions import...
null
null
null
urllib3/urllib3
train
242
1191719a9ce99e3b87f280f92ffede99929bc9dd
train
test/with_dummyserver/test_socketlevel.py
train
urllib3/urllib3:test/with_dummyserver/test_socketlevel.py
1,336
8
self.assertEqual
test_empty_head_response_does_not_hang
# TODO: Break this module up into pieces. Maybe group by functionality tested # rather than the socket level-ness of it. from urllib3 import HTTPConnectionPool, HTTPSConnectionPool from urllib3.poolmanager import proxy_from_url from urllib3.exceptions import ( MaxRetryError, ProxyError, ReadTim...
list(r.stream()))
added
a31a6a4e721d8caf05d8ffa67b6bc0fc7db9a0ef4590f02899dcf4af33de055b
self.assertEqual|test_empty_head_response_does_not_hang|# TODO: Break this module up into pieces. Maybe group by functionality tested # rather than the socket level-ness of it. from urllib3 import HTTPConnectionPool, HTTPSConnectionPool from urllib3.poolmanager import proxy_from_url from urllib3.exceptions import ( Max...
null
null
null
urllib3/urllib3
train
242
1191719a9ce99e3b87f280f92ffede99929bc9dd
train
test/with_dummyserver/test_socketlevel.py
train
urllib3/urllib3:test/with_dummyserver/test_socketlevel.py
1,407
12
self.assertTrue
test_enforce_content_length_get
# TODO: Break this module up into pieces. Maybe group by functionality tested # rather than the socket level-ness of it. from urllib3 import HTTPConnectionPool, HTTPSConnectionPool from urllib3.poolmanager import proxy_from_url from urllib3.exceptions import ( MaxRetryError, ProxyError, ReadTim...
'12 bytes read, 10 more expected' in str(e))
added
a1c5c958290d3242c86142a298746c0ac0e9aa3383819ac558bbe71bf020bf31
self.assertTrue|test_enforce_content_length_get|# TODO: Break this module up into pieces. Maybe group by functionality tested # rather than the socket level-ness of it. from urllib3 import HTTPConnectionPool, HTTPSConnectionPool from urllib3.poolmanager import proxy_from_url from urllib3.exceptions import ( MaxRetryErr...
null
null
null
urllib3/urllib3
train
243
9a18df391148e589d6ebb8e874dd0cf58d147aa4
train
test/test_compatibility.py
train
urllib3/urllib3:test/test_compatibility.py
40
8
assert
test_extract
import warnings import pytest from urllib3.connection import HTTPConnection from urllib3.response import HTTPResponse from urllib3.packages.six.moves import http_cookiejar, urllib class TestVersionCompatibility(object): def test_connection_strict(self): with warnings.catch_warnings(record=True) as w: ...
len(cookies)
added
b574621bc4e7f1182d4a5c5515cbc068c9b013d4c748dc65d58da33ae1377f26
assert|test_extract|import warnings import pytest from urllib3.connection import HTTPConnection from urllib3.response import HTTPResponse from urllib3.packages.six.moves import http_cookiejar, urllib class TestVersionCompatibility(object): def test_connection_strict(self): with warnings.catch_warnings(record=True) as w...
null
null
null
urllib3/urllib3
train
244
de814552d76f081de2ed602c6370e6a66880ad3b
train
test/test_response.py
train
urllib3/urllib3:test/test_response.py
93
8
assert
test_reference_read
import socket from io import BytesIO, BufferedReader import pytest import mock from urllib3.response import HTTPResponse from urllib3.exceptions import ( DecodeError, ResponseNotChunked, ProtocolError, InvalidHeader ) from urllib3.packages.six.moves import http_client as httplib from urllib3.util.retry import Re...
b'f'
modified
4a9f50c508760ea019cbcad0f6115afe123137d1defa0026b6aa8517445182b8
assert|test_reference_read|import socket from io import BytesIO, BufferedReader import pytest import mock from urllib3.response import HTTPResponse from urllib3.exceptions import ( DecodeError, ResponseNotChunked, ProtocolError, InvalidHeader ) from urllib3.packages.six.moves import http_client as httplib from urllib3....
b'f'
92
8
urllib3/urllib3
train
244
de814552d76f081de2ed602c6370e6a66880ad3b
train
test/test_response.py
train
urllib3/urllib3:test/test_response.py
439
8
assert
test_length_w_bad_header
import socket from io import BytesIO, BufferedReader import pytest import mock from urllib3.response import HTTPResponse from urllib3.exceptions import ( DecodeError, ResponseNotChunked, ProtocolError, InvalidHeader ) from urllib3.packages.six.moves import http_client as httplib from urllib3.util.retry import Re...
None
modified
8719ba1afa3ea65c840405c1dc0f608f719c8df9cab95a3adce63f369a297134
assert|test_length_w_bad_header|import socket from io import BytesIO, BufferedReader import pytest import mock from urllib3.response import HTTPResponse from urllib3.exceptions import ( DecodeError, ResponseNotChunked, ProtocolError, InvalidHeader ) from urllib3.packages.six.moves import http_client as httplib from url...
None
438
8
urllib3/urllib3
train
244
de814552d76f081de2ed602c6370e6a66880ad3b
train
test/test_response.py
train
urllib3/urllib3:test/test_response.py
464
13
pytest.raises
test_length_with_multiple_content_lengths
import socket from io import BytesIO, BufferedReader import pytest import mock from urllib3.response import HTTPResponse from urllib3.exceptions import ( DecodeError, ResponseNotChunked, ProtocolError, InvalidHeader ) from urllib3.packages.six.moves import http_client as httplib from urllib3.util.retry import Re...
InvalidHeader)
modified
509494af00979a1e0eb96eb53b929e00ffeeadbf28dce18f57a15784ddeb67ea
pytest.raises|test_length_with_multiple_content_lengths|import socket from io import BytesIO, BufferedReader import pytest import mock from urllib3.response import HTTPResponse from urllib3.exceptions import ( DecodeError, ResponseNotChunked, ProtocolError, InvalidHeader ) from urllib3.packages.six.moves import http_cl...
InvalidHeader)
463
13
urllib3/urllib3
train
244
de814552d76f081de2ed602c6370e6a66880ad3b
train
test/test_response.py
train
urllib3/urllib3:test/test_response.py
629
8
assert
test_get_case_insensitive_headers
import socket from io import BytesIO, BufferedReader import pytest import mock from urllib3.response import HTTPResponse from urllib3.exceptions import ( DecodeError, ResponseNotChunked, ProtocolError, InvalidHeader ) from urllib3.packages.six.moves import http_client as httplib from urllib3.util.retry import Re...
'example.com'
added
dcabd887b7f3cdb686d37d46b01c1642fed2c780563e499f9ad226f36fbc34e6
assert|test_get_case_insensitive_headers|import socket from io import BytesIO, BufferedReader import pytest import mock from urllib3.response import HTTPResponse from urllib3.exceptions import ( DecodeError, ResponseNotChunked, ProtocolError, InvalidHeader ) from urllib3.packages.six.moves import http_client as httplib...
null
null
null
urllib3/urllib3
train
245
bf5b620aa4eec99dd16734ed21901ebd5702ce89
train
test/contrib/test_pyopenssl.py
train
urllib3/urllib3:test/contrib/test_pyopenssl.py
48
8
self.assertEqual
test_dnsname_to_stdlib_leading_period
# -*- coding: utf-8 -*- import unittest import pytest try: from urllib3.contrib.pyopenssl import (inject_into_urllib3, extract_from_urllib3, _dnsname_to_stdlib) except ImportError as e: pytestmark = pytest.mark.skip('Could n...
expected_result)
modified
45012b52896ce39e9901299f2f57bef9354409efd4c19da919d584837774b937
self.assertEqual|test_dnsname_to_stdlib_leading_period|# -*- coding: utf-8 -*- import unittest import pytest try: from urllib3.contrib.pyopenssl import (inject_into_urllib3, extract_from_urllib3, _dnsname_to_stdlib) except ImportError as e: pytestmark = pytest.mark.skip('Could not import PyOpenSSL: %r' % e) from ..with...
expected_result)
48
8
urllib3/urllib3
train
245
bf5b620aa4eec99dd16734ed21901ebd5702ce89
train
test/contrib/test_pyopenssl_dependencies.py
train
urllib3/urllib3:test/contrib/test_pyopenssl_dependencies.py
26
16
self.assertRaises
test_inject_validate_fail_cryptography
# -*- coding: utf-8 -*- import unittest import pytest try: from urllib3.contrib.pyopenssl import (inject_into_urllib3, extract_from_urllib3) except ImportError as e: pytestmark = pytest.mark.skip('Could not import PyOpenSSL: %r' % e) from mock import patch, Mock c...
ImportError)
modified
b78c8ae725ca02dcd860863ed07c624978e04ab8aa34aac6f30249014856d157
self.assertRaises|test_inject_validate_fail_cryptography|# -*- coding: utf-8 -*- import unittest import pytest try: from urllib3.contrib.pyopenssl import (inject_into_urllib3, extract_from_urllib3) except ImportError as e: pytestmark = pytest.mark.skip('Could not import PyOpenSSL: %r' % e) from mock import patch, Mock ...
ImportError)
26
16
urllib3/urllib3
train
245
bf5b620aa4eec99dd16734ed21901ebd5702ce89
train
test/contrib/test_socks.py
train
urllib3/urllib3:test/contrib/test_socks.py
391
8
self.assertEqual
test_socks_with_password
import threading import socket from urllib3.contrib import socks from urllib3.exceptions import ConnectTimeoutError, NewConnectionError from dummyserver.server import DEFAULT_CERTS from dummyserver.testcase import IPV4SocketDummyServerTestCase import pytest try: import ssl from urllib3.util import ssl_ as b...
'SocksTestServer')
modified
99b830246a42f97fff95c34ea07b4698c220910da472ef479ae9ce5598534cc9
self.assertEqual|test_socks_with_password|import threading import socket from urllib3.contrib import socks from urllib3.exceptions import ConnectTimeoutError, NewConnectionError from dummyserver.server import DEFAULT_CERTS from dummyserver.testcase import IPV4SocketDummyServerTestCase import pytest try: import ssl from...
'SocksTestServer')
391
8
urllib3/urllib3
train
245
bf5b620aa4eec99dd16734ed21901ebd5702ce89
train
test/with_dummyserver/test_https.py
train
urllib3/urllib3:test/with_dummyserver/test_https.py
503
12
self.assertTrue
test_ssl_wrong_system_time
import datetime import logging import ssl import sys import unittest import warnings import mock import pytest from dummyserver.testcase import ( HTTPSDummyServerTestCase, IPV6HTTPSDummyServerTestCase ) from dummyserver.server import (DEFAULT_CA, DEFAULT_CA_BAD, DEFAULT_CERTS, NO_S...
str(RECENT_DATE) in warning.message.args[0])
modified
247ed1cd8a4da5c8281bce70a79fdfe3a9a15121c0ec4f4afae523ad9b0135cc
self.assertTrue|test_ssl_wrong_system_time|import datetime import logging import ssl import sys import unittest import warnings import mock import pytest from dummyserver.testcase import ( HTTPSDummyServerTestCase, IPV6HTTPSDummyServerTestCase ) from dummyserver.server import (DEFAULT_CA, DEFAULT_CA_BAD, DEFAULT_CERTS,...
str(RECENT_DATE) in warning.message.args[0])
503
12
urllib3/urllib3
train
245
bf5b620aa4eec99dd16734ed21901ebd5702ce89
train
test/with_dummyserver/test_poolmanager.py
train
urllib3/urllib3:test/with_dummyserver/test_poolmanager.py
52
8
self.assertEqual
test_redirect_twice
import unittest import json import pytest from dummyserver.server import HAS_IPV6 from dummyserver.testcase import (HTTPDummyServerTestCase, IPv6HTTPDummyServerTestCase) from urllib3.poolmanager import PoolManager from urllib3.connectionpool import port_by_scheme from urllib3.excepti...
b'Dummy server!')
modified
a2ed0fe7352bdb4cc850a249ec3bf25c537ba4f36ae7e89bd87c238c2b6d3d10
self.assertEqual|test_redirect_twice|import unittest import json import pytest from dummyserver.server import HAS_IPV6 from dummyserver.testcase import (HTTPDummyServerTestCase, IPv6HTTPDummyServerTestCase) from urllib3.poolmanager import PoolManager from urllib3.connectionpool import port_by_scheme from urllib3.except...
b'Dummy server!')
51
8
urllib3/urllib3
train
245
bf5b620aa4eec99dd16734ed21901ebd5702ce89
train
test/with_dummyserver/test_proxy_poolmanager.py
train
urllib3/urllib3:test/with_dummyserver/test_proxy_poolmanager.py
127
8
self.assertEqual
test_redirect
import json import socket import unittest import pytest from dummyserver.testcase import HTTPDummyProxyTestCase, IPv6HTTPDummyProxyTestCase from dummyserver.server import ( DEFAULT_CA, DEFAULT_CA_BAD, get_unreachable_address) from .. import TARPIT_HOST, requires_network from urllib3._collections import HTTPHeade...
b'Dummy server!')
modified
56c812842715a27378989f0ce012a18ac1c331355e3cc28cd3e0096c7d8c3ce5
self.assertEqual|test_redirect|import json import socket import unittest import pytest from dummyserver.testcase import HTTPDummyProxyTestCase, IPv6HTTPDummyProxyTestCase from dummyserver.server import ( DEFAULT_CA, DEFAULT_CA_BAD, get_unreachable_address) from .. import TARPIT_HOST, requires_network from urllib3._coll...
b'Dummy server!')
127
8
urllib3/urllib3
train
245
bf5b620aa4eec99dd16734ed21901ebd5702ce89
train
test/with_dummyserver/test_socketlevel.py
train
urllib3/urllib3:test/with_dummyserver/test_socketlevel.py
989
13
self.assertRaises
test_ssl_failure_midway_through_conn
# TODO: Break this module up into pieces. Maybe group by functionality tested # rather than the socket level-ness of it. from urllib3 import HTTPConnectionPool, HTTPSConnectionPool from urllib3.poolmanager import proxy_from_url from urllib3.exceptions import ( MaxRetryError, ProxyError, ReadTim...
MaxRetryError)
modified
ab44771384827382ae63a8957a32068912ba2dccc30736580b09b336249b033d
self.assertRaises|test_ssl_failure_midway_through_conn|# TODO: Break this module up into pieces. Maybe group by functionality tested # rather than the socket level-ness of it. from urllib3 import HTTPConnectionPool, HTTPSConnectionPool from urllib3.poolmanager import proxy_from_url from urllib3.exceptions import ( MaxR...
MaxRetryError)
990
13