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
29
99cd0a3c68de889af1cbcf82580d24057ab8a29d
train
test/test_connectionpool.py
train
urllib3/urllib3:test/test_connectionpool.py
60
8
self.assertEqual
test_make_headers
import unittest from urllib3.connectionpool import ( connection_from_url, get_host, HTTPConnectionPool, make_headers) from urllib3.exceptions import EmptyPoolError class TestConnectionPool(unittest.TestCase): def test_get_host(self): url_host_map = { 'http://google.com/mail':...
{'accept-encoding': 'foo,bar'})
modified
05a1ab4b7e907513519e02b8a9bb786b688c885ab095e6caad76ca8ebc50b5b1
self.assertEqual|test_make_headers|import unittest from urllib3.connectionpool import ( connection_from_url, get_host, HTTPConnectionPool, make_headers) from urllib3.exceptions import EmptyPoolError class TestConnectionPool(unittest.TestCase): def test_get_host(self): url_host_map = { 'http://google.com/mail': ('http',...
{'accept-encoding': 'foo,bar'})
62
8
urllib3/urllib3
train
29
99cd0a3c68de889af1cbcf82580d24057ab8a29d
train
test/test_connectionpool.py
train
urllib3/urllib3:test/test_connectionpool.py
68
8
self.assertEqual
test_make_headers
import unittest from urllib3.connectionpool import ( connection_from_url, get_host, HTTPConnectionPool, make_headers) from urllib3.exceptions import EmptyPoolError class TestConnectionPool(unittest.TestCase): def test_get_host(self): url_host_map = { 'http://google.com/mail':...
{'accept-encoding': 'gzip,deflate', 'user-agent': 'banana'})
modified
9fe0a6c639e216873fdfebf13608aab61d34228def464815b22c3de2d5f49e8f
self.assertEqual|test_make_headers|import unittest from urllib3.connectionpool import ( connection_from_url, get_host, HTTPConnectionPool, make_headers) from urllib3.exceptions import EmptyPoolError class TestConnectionPool(unittest.TestCase): def test_get_host(self): url_host_map = { 'http://google.com/mail': ('http',...
{'accept-encoding': 'gzip,deflate', 'user-agent': 'banana'})
70
8
urllib3/urllib3
train
29
99cd0a3c68de889af1cbcf82580d24057ab8a29d
train
test/with_dummyserver/test_socket_closing.py
train
urllib3/urllib3:test/with_dummyserver/test_socket_closing.py
41
8
self.assertEqual
test_recovery_when_server_closes_connection
from urllib3 import HTTPConnectionPool, PoolManager from urllib3.connectionpool import port_by_scheme from dummyserver.testcase import SocketDummyServerTestCase from threading import Event class TestSocketClosing(SocketDummyServerTestCase): def test_recovery_when_server_closes_connection(self): # Does ...
'Response 0')
added
354c5bc902a8aa7c45a34ac2bd008907a24c8497ec96bad4a74d7f64f4e19d0e
self.assertEqual|test_recovery_when_server_closes_connection|from urllib3 import HTTPConnectionPool, PoolManager from urllib3.connectionpool import port_by_scheme from dummyserver.testcase import SocketDummyServerTestCase from threading import Event class TestSocketClosing(SocketDummyServerTestCase): def test_recovery_...
null
null
null
urllib3/urllib3
train
29
99cd0a3c68de889af1cbcf82580d24057ab8a29d
train
test/with_dummyserver/test_socket_closing.py
train
urllib3/urllib3:test/with_dummyserver/test_socket_closing.py
47
8
self.assertEqual
test_recovery_when_server_closes_connection
from urllib3 import HTTPConnectionPool, PoolManager from urllib3.connectionpool import port_by_scheme from dummyserver.testcase import SocketDummyServerTestCase from threading import Event class TestSocketClosing(SocketDummyServerTestCase): def test_recovery_when_server_closes_connection(self): # Does ...
'Response 1')
added
cb9ba8015b063e50e7035b0b09a5c96b948f7bf99bfbc653c5314216e29bc947
self.assertEqual|test_recovery_when_server_closes_connection|from urllib3 import HTTPConnectionPool, PoolManager from urllib3.connectionpool import port_by_scheme from dummyserver.testcase import SocketDummyServerTestCase from threading import Event class TestSocketClosing(SocketDummyServerTestCase): def test_recovery_...
null
null
null
urllib3/urllib3
train
29
99cd0a3c68de889af1cbcf82580d24057ab8a29d
train
test/with_dummyserver/test_socket_closing.py
train
urllib3/urllib3:test/with_dummyserver/test_socket_closing.py
80
8
self.assertEqual
test_request_survives_missing_port_number
from urllib3 import HTTPConnectionPool, PoolManager from urllib3.connectionpool import port_by_scheme from dummyserver.testcase import SocketDummyServerTestCase from threading import Event class TestSocketClosing(SocketDummyServerTestCase): def test_recovery_when_server_closes_connection(self): # Does ...
'Inspire.')
added
fd17e0372bf5290b919865d9ca2265d5a85c289e7980d53915eca86aa6ce7f87
self.assertEqual|test_request_survives_missing_port_number|from urllib3 import HTTPConnectionPool, PoolManager from urllib3.connectionpool import port_by_scheme from dummyserver.testcase import SocketDummyServerTestCase from threading import Event class TestSocketClosing(SocketDummyServerTestCase): def test_recovery_wh...
null
null
null
urllib3/urllib3
train
30
7ade98659602289c2d151ced59667644913a27c0
train
test/with_dummyserver/test_poolmanager.py
train
urllib3/urllib3:test/with_dummyserver/test_poolmanager.py
26
8
self.assertEqual
test_redirect
import unittest from dummyserver.testcase import HTTPDummyServerTestCase from urllib3.connectionpool import port_by_scheme from urllib3.poolmanager import PoolManager from urllib3.exceptions import MaxRetryError class TestPoolManager(HTTPDummyServerTestCase): base_url = 'http://%s:%d' % (HTTPDummyServerTestCase....
'Dummy server!')
modified
14061eb95c452d8cc48dea351cc267c037536e81ec9422a07366d05595696e98
self.assertEqual|test_redirect|import unittest from dummyserver.testcase import HTTPDummyServerTestCase from urllib3.connectionpool import port_by_scheme from urllib3.poolmanager import PoolManager from urllib3.exceptions import MaxRetryError class TestPoolManager(HTTPDummyServerTestCase): base_url = 'http://%s:%d' % (...
'Dummy server!')
25
8
urllib3/urllib3
train
30
7ade98659602289c2d151ced59667644913a27c0
train
test/with_dummyserver/test_poolmanager.py
train
urllib3/urllib3:test/with_dummyserver/test_poolmanager.py
45
8
self.assertEqual
test_cross_host_redirect
import unittest from dummyserver.testcase import HTTPDummyServerTestCase from urllib3.connectionpool import port_by_scheme from urllib3.poolmanager import PoolManager from urllib3.exceptions import MaxRetryError class TestPoolManager(HTTPDummyServerTestCase): base_url = 'http://%s:%d' % (HTTPDummyServerTestCase....
self.host_alt)
modified
e7389e2615ea036ad5329e5989eec6ff665ca9d6040773d2fab5dcf976a6afdb
self.assertEqual|test_cross_host_redirect|import unittest from dummyserver.testcase import HTTPDummyServerTestCase from urllib3.connectionpool import port_by_scheme from urllib3.poolmanager import PoolManager from urllib3.exceptions import MaxRetryError class TestPoolManager(HTTPDummyServerTestCase): base_url = 'http:/...
self.host_alt)
44
8
urllib3/urllib3
train
30
7ade98659602289c2d151ced59667644913a27c0
train
test/with_dummyserver/test_poolmanager.py
train
urllib3/urllib3:test/with_dummyserver/test_poolmanager.py
63
8
self.assertEqual
test_missing_port
import unittest from dummyserver.testcase import HTTPDummyServerTestCase from urllib3.connectionpool import port_by_scheme from urllib3.poolmanager import PoolManager from urllib3.exceptions import MaxRetryError class TestPoolManager(HTTPDummyServerTestCase): base_url = 'http://%s:%d' % (HTTPDummyServerTestCase....
'Dummy server!')
added
5518d8b014624d9a75b014638a476b8c52d26c43e3eeb03137d3f27cc9d7f88e
self.assertEqual|test_missing_port|import unittest from dummyserver.testcase import HTTPDummyServerTestCase from urllib3.connectionpool import port_by_scheme from urllib3.poolmanager import PoolManager from urllib3.exceptions import MaxRetryError class TestPoolManager(HTTPDummyServerTestCase): base_url = 'http://%s:%d'...
null
null
null
urllib3/urllib3
train
31
045c179cad2db3edaf802d03a07a5a02e341e145
train
test/test_connectionpool.py
train
urllib3/urllib3:test/test_connectionpool.py
96
8
self.assertEqual
test_exception_str
import unittest from urllib3.connectionpool import ( connection_from_url, get_host, HTTPConnectionPool, make_headers) from urllib3.exceptions import EmptyPoolError class TestConnectionPool(unittest.TestCase): def test_get_host(self): url_host_map = { 'http://google.com/mail':...
"HTTPConnectionPool(host='localhost', port=None): Test.")
added
7b78b69b92d958d66104da73b26917a94f4742e47f6f8324f71bf7d476687cca
self.assertEqual|test_exception_str|import unittest from urllib3.connectionpool import ( connection_from_url, get_host, HTTPConnectionPool, make_headers) from urllib3.exceptions import EmptyPoolError class TestConnectionPool(unittest.TestCase): def test_get_host(self): url_host_map = { 'http://google.com/mail': ('http'...
null
null
null
urllib3/urllib3
train
32
3cc735dac8f3c722ef85d764d64de078ba755758
train
test/benchmark.py
train
urllib3/urllib3:test/benchmark.py
39
4
assert
#!/usr/bin/env python """ Really simple rudimentary benchmark to compare ConnectionPool versus standard urllib to demonstrate the usefulness of connection re-using. """ from __future__ import print_function import sys import time import urllib sys.path.append('../') import urllib3 # URLs to download. Doesn't matte...
url_list
added
ee6fe7779493b0bb26b97d051fa598ad71ffe6324b1ddc71def4cfedd0afb76a
assert||#!/usr/bin/env python """ Really simple rudimentary benchmark to compare ConnectionPool versus standard urllib to demonstrate the usefulness of connection re-using. """ from __future__ import print_function import sys import time import urllib sys.path.append('../') import urllib3 # URLs to download. Doesn't ma...
null
null
null
urllib3/urllib3
train
32
3cc735dac8f3c722ef85d764d64de078ba755758
train
test/test_collections.py
train
urllib3/urllib3:test/test_collections.py
38
8
self.assertEqual
test_expire
import unittest from urllib3._collections import RecentlyUsedContainer as Container from urllib3.packages import six xrange = six.moves.xrange class TestLRUContainer(unittest.TestCase): def test_maxsize(self): d = Container(5) for i in xrange(5): d[i] = str(i) self.assertEqua...
[0, 2, 3, 4, 5])
modified
e1ac7e7f93d7f2e2ec21334d58f219f21b8fa8e83d04d543de92aa7eeb79674d
self.assertEqual|test_expire|import unittest from urllib3._collections import RecentlyUsedContainer as Container from urllib3.packages import six xrange = six.moves.xrange class TestLRUContainer(unittest.TestCase): def test_maxsize(self): d = Container(5) for i in xrange(5): d[i] = str(i) self.assertEqual(len(d), 5) fo...
[0, 2, 3, 4, 5])
37
8
urllib3/urllib3
train
32
3cc735dac8f3c722ef85d764d64de078ba755758
train
test/test_connectionpool.py
train
urllib3/urllib3:test/test_connectionpool.py
53
12
self.assertFalse
test_same_host
import unittest from urllib3.connectionpool import ( connection_from_url, get_host, HTTPConnectionPool, make_headers) from urllib3.exceptions import EmptyPoolError class TestConnectionPool(unittest.TestCase): def test_get_host(self): url_host_map = { 'http://google.com/mail':...
c.is_same_host(b))
modified
b9f746ca0cda5ca39ef45231229109ad8ddd753825baed48e217111bbb6b3ec9
self.assertFalse|test_same_host|import unittest from urllib3.connectionpool import ( connection_from_url, get_host, HTTPConnectionPool, make_headers) from urllib3.exceptions import EmptyPoolError class TestConnectionPool(unittest.TestCase): def test_get_host(self): url_host_map = { 'http://google.com/mail': ('http', 'g...
c.is_same_host(b))
53
12
urllib3/urllib3
train
32
3cc735dac8f3c722ef85d764d64de078ba755758
train
test/test_connectionpool.py
train
urllib3/urllib3:test/test_connectionpool.py
56
8
self.assertEqual
test_make_headers
import unittest from urllib3.connectionpool import ( connection_from_url, get_host, HTTPConnectionPool, make_headers) from urllib3.exceptions import EmptyPoolError class TestConnectionPool(unittest.TestCase): def test_get_host(self): url_host_map = { 'http://google.com/mail':...
{'accept-encoding': 'gzip,deflate'})
modified
355c909745f2d83c12c91041372d031367c8adbe84a0803960a26f1da890af9f
self.assertEqual|test_make_headers|import unittest from urllib3.connectionpool import ( connection_from_url, get_host, HTTPConnectionPool, make_headers) from urllib3.exceptions import EmptyPoolError class TestConnectionPool(unittest.TestCase): def test_get_host(self): url_host_map = { 'http://google.com/mail': ('http',...
{'accept-encoding': 'gzip,deflate'})
56
8
urllib3/urllib3
train
32
3cc735dac8f3c722ef85d764d64de078ba755758
train
test/test_response.py
train
urllib3/urllib3:test/test_response.py
17
8
self.assertEqual
test_getheader
import unittest import zlib from io import BytesIO from urllib3.response import HTTPResponse class TestLegacyResponse(unittest.TestCase): def test_getheaders(self): headers = {'host': 'example.com'} r = HTTPResponse(headers=headers) self.assertEqual(r.getheaders(), headers) def test_...
'example.com')
modified
22e9eb22bfb79578417d11e57708ab94bd085c236bc5c2749aea0e5e0f49f692
self.assertEqual|test_getheader|import unittest import zlib from io import BytesIO from urllib3.response import HTTPResponse class TestLegacyResponse(unittest.TestCase): def test_getheaders(self): headers = {'host': 'example.com'} r = HTTPResponse(headers=headers) self.assertEqual(r.getheaders(), headers) def test_geth...
'example.com')
17
8
urllib3/urllib3
train
32
3cc735dac8f3c722ef85d764d64de078ba755758
train
test/with_dummyserver/test_connectionpool.py
train
urllib3/urllib3:test/with_dummyserver/test_connectionpool.py
35
8
self.assertEqual
test_post_url
import logging import sys import unittest try: from urllib.parse import urlencode except: from urllib import urlencode from urllib3 import encode_multipart_formdata, HTTPConnectionPool from urllib3.exceptions import TimeoutError, EmptyPoolError, MaxRetryError from urllib3.packages.six import u from dummyserv...
r.data)
added
e9d19ed6dc1bcbb2b91f850e32dcb62576c0aa7479facfefc70fa5880a5b9f46
self.assertEqual|test_post_url|import logging import sys import unittest try: from urllib.parse import urlencode except: from urllib import urlencode from urllib3 import encode_multipart_formdata, HTTPConnectionPool from urllib3.exceptions import TimeoutError, EmptyPoolError, MaxRetryError from urllib3.packages.six imp...
null
null
null
urllib3/urllib3
train
32
3cc735dac8f3c722ef85d764d64de078ba755758
train
test/with_dummyserver/test_https.py
train
urllib3/urllib3:test/with_dummyserver/test_https.py
58
12
self.assertTrue
test_verified
import logging import sys import unittest from dummyserver.testcase import HTTPSDummyServerTestCase from dummyserver.server import DEFAULT_CA, DEFAULT_CA_BAD from urllib3 import HTTPSConnectionPool from urllib3.connectionpool import VerifiedHTTPSConnection from urllib3.exceptions import SSLError log = logging.getLo...
"doesn't match" in str(e))
added
a49d3388770ba65bb632097b9456ad9702e8f117f0ff6cb815cf18d6ce0c71aa
self.assertTrue|test_verified|import logging import sys import unittest from dummyserver.testcase import HTTPSDummyServerTestCase from dummyserver.server import DEFAULT_CA, DEFAULT_CA_BAD from urllib3 import HTTPSConnectionPool from urllib3.connectionpool import VerifiedHTTPSConnection from urllib3.exceptions import SS...
null
null
null
urllib3/urllib3
train
32
3cc735dac8f3c722ef85d764d64de078ba755758
train
test/with_dummyserver/test_poolmanager.py
train
urllib3/urllib3:test/with_dummyserver/test_poolmanager.py
63
8
self.assertEqual
test_missing_port
import unittest from dummyserver.testcase import HTTPDummyServerTestCase from urllib3.connectionpool import port_by_scheme from urllib3.poolmanager import PoolManager from urllib3.exceptions import MaxRetryError class TestPoolManager(HTTPDummyServerTestCase): base_url = 'http://%s:%d' % (HTTPDummyServerTestCase....
'Dummy server!')
modified
221a258e1088d7224a8ba50db76c70fc88e5dd3569c454074dc186931767751b
self.assertEqual|test_missing_port|import unittest from dummyserver.testcase import HTTPDummyServerTestCase from urllib3.connectionpool import port_by_scheme from urllib3.poolmanager import PoolManager from urllib3.exceptions import MaxRetryError class TestPoolManager(HTTPDummyServerTestCase): base_url = 'http://%s:%d'...
'Dummy server!')
63
8
urllib3/urllib3
train
33
2bb2424605228f7f09105e92440edb76755c900d
train
test/test_response.py
train
urllib3/urllib3:test/test_response.py
39
8
self.assertEqual
test_preload
import unittest import zlib from io import BytesIO from urllib3.response import HTTPResponse class TestLegacyResponse(unittest.TestCase): def test_getheaders(self): headers = {'host': 'example.com'} r = HTTPResponse(headers=headers) self.assertEqual(r.getheaders(), headers) def test_...
len(b'foo'))
modified
84f7ee9db9e118fac32b06c88803dd9b0174e712640d14f24c76c57d175bbf4b
self.assertEqual|test_preload|import unittest import zlib from io import BytesIO from urllib3.response import HTTPResponse class TestLegacyResponse(unittest.TestCase): def test_getheaders(self): headers = {'host': 'example.com'} r = HTTPResponse(headers=headers) self.assertEqual(r.getheaders(), headers) def test_gethea...
len(b'foo'))
39
8
urllib3/urllib3
train
33
2bb2424605228f7f09105e92440edb76755c900d
train
test/test_response.py
train
urllib3/urllib3:test/test_response.py
49
8
self.assertEqual
test_no_preload
import unittest import zlib from io import BytesIO from urllib3.response import HTTPResponse class TestLegacyResponse(unittest.TestCase): def test_getheaders(self): headers = {'host': 'example.com'} r = HTTPResponse(headers=headers) self.assertEqual(r.getheaders(), headers) def test_...
len(b'foo'))
modified
d6fe369039674119bad67e307317fa841b1be9239126512c5efa38f6687ce0c6
self.assertEqual|test_no_preload|import unittest import zlib from io import BytesIO from urllib3.response import HTTPResponse class TestLegacyResponse(unittest.TestCase): def test_getheaders(self): headers = {'host': 'example.com'} r = HTTPResponse(headers=headers) self.assertEqual(r.getheaders(), headers) def test_get...
len(b'foo'))
49
8
urllib3/urllib3
train
33
2bb2424605228f7f09105e92440edb76755c900d
train
test/test_response.py
train
urllib3/urllib3:test/test_response.py
53
8
self.assertRaises
test_decode_bad_data
import unittest import zlib from io import BytesIO from urllib3.response import HTTPResponse class TestLegacyResponse(unittest.TestCase): def test_getheaders(self): headers = {'host': 'example.com'} r = HTTPResponse(headers=headers) self.assertEqual(r.getheaders(), headers) def test_...
zlib.error)
modified
44f75c9f7f2c33b842b5f3dd836a111f3394005210887dcc482471a30f680eb7
self.assertRaises|test_decode_bad_data|import unittest import zlib from io import BytesIO from urllib3.response import HTTPResponse class TestLegacyResponse(unittest.TestCase): def test_getheaders(self): headers = {'host': 'example.com'} r = HTTPResponse(headers=headers) self.assertEqual(r.getheaders(), headers) def te...
zlib.error)
53
8
urllib3/urllib3
train
33
2bb2424605228f7f09105e92440edb76755c900d
train
test/test_response.py
train
urllib3/urllib3:test/test_response.py
64
8
self.assertEqual
test_decode_deflate
import unittest import zlib from io import BytesIO from urllib3.response import HTTPResponse class TestLegacyResponse(unittest.TestCase): def test_getheaders(self): headers = {'host': 'example.com'} r = HTTPResponse(headers=headers) self.assertEqual(r.getheaders(), headers) def test_...
b'foo')
modified
1fc3ab3b17ffac352fd61677d9393d404145caf015661ca09f459fd76f7f9e22
self.assertEqual|test_decode_deflate|import unittest import zlib from io import BytesIO from urllib3.response import HTTPResponse class TestLegacyResponse(unittest.TestCase): def test_getheaders(self): headers = {'host': 'example.com'} r = HTTPResponse(headers=headers) self.assertEqual(r.getheaders(), headers) def test...
b'foo')
64
8
urllib3/urllib3
train
34
c064a1086eeae1d6e89734e0a07810dcded61b87
train
test/test_response.py
train
urllib3/urllib3:test/test_response.py
39
8
self.assertEqual
test_preload
import unittest import zlib from io import BytesIO from urllib3.response import HTTPResponse class TestLegacyResponse(unittest.TestCase): def test_getheaders(self): headers = {'host': 'example.com'} r = HTTPResponse(headers=headers) self.assertEqual(r.getheaders(), headers) def test_...
len(b'foo'))
modified
1a719f5554fa1627e38554f86313679abdb7b79633d5dfe5d06620f3cf81126d
self.assertEqual|test_preload|import unittest import zlib from io import BytesIO from urllib3.response import HTTPResponse class TestLegacyResponse(unittest.TestCase): def test_getheaders(self): headers = {'host': 'example.com'} r = HTTPResponse(headers=headers) self.assertEqual(r.getheaders(), headers) def test_gethea...
len(b'foo'))
39
8
urllib3/urllib3
train
34
c064a1086eeae1d6e89734e0a07810dcded61b87
train
test/test_response.py
train
urllib3/urllib3:test/test_response.py
48
8
self.assertEqual
test_no_preload
import unittest import zlib from io import BytesIO from urllib3.response import HTTPResponse class TestLegacyResponse(unittest.TestCase): def test_getheaders(self): headers = {'host': 'example.com'} r = HTTPResponse(headers=headers) self.assertEqual(r.getheaders(), headers) def test_...
b'foo')
modified
f3946bc17cb77b7903d562af6d3c52c2eae45f151457b3374245b3a8005ececc
self.assertEqual|test_no_preload|import unittest import zlib from io import BytesIO from urllib3.response import HTTPResponse class TestLegacyResponse(unittest.TestCase): def test_getheaders(self): headers = {'host': 'example.com'} r = HTTPResponse(headers=headers) self.assertEqual(r.getheaders(), headers) def test_get...
b'foo')
48
8
urllib3/urllib3
train
34
c064a1086eeae1d6e89734e0a07810dcded61b87
train
test/test_response.py
train
urllib3/urllib3:test/test_response.py
53
8
self.assertRaises
test_decode_bad_data
import unittest import zlib from io import BytesIO from urllib3.response import HTTPResponse class TestLegacyResponse(unittest.TestCase): def test_getheaders(self): headers = {'host': 'example.com'} r = HTTPResponse(headers=headers) self.assertEqual(r.getheaders(), headers) def test_...
zlib.error)
modified
6d974282d7253f89834b660fe647bb54f87b3d4c6ba4aa67108b87f8ad392325
self.assertRaises|test_decode_bad_data|import unittest import zlib from io import BytesIO from urllib3.response import HTTPResponse class TestLegacyResponse(unittest.TestCase): def test_getheaders(self): headers = {'host': 'example.com'} r = HTTPResponse(headers=headers) self.assertEqual(r.getheaders(), headers) def te...
zlib.error)
53
8
urllib3/urllib3
train
34
c064a1086eeae1d6e89734e0a07810dcded61b87
train
test/test_response.py
train
urllib3/urllib3:test/test_response.py
64
8
self.assertEqual
test_decode_deflate
import unittest import zlib from io import BytesIO from urllib3.response import HTTPResponse class TestLegacyResponse(unittest.TestCase): def test_getheaders(self): headers = {'host': 'example.com'} r = HTTPResponse(headers=headers) self.assertEqual(r.getheaders(), headers) def test_...
b'foo')
modified
6df670105758e818f4a2a5fd920327bd7b621c4a152913e7f59e294ec3b90ca5
self.assertEqual|test_decode_deflate|import unittest import zlib from io import BytesIO from urllib3.response import HTTPResponse class TestLegacyResponse(unittest.TestCase): def test_getheaders(self): headers = {'host': 'example.com'} r = HTTPResponse(headers=headers) self.assertEqual(r.getheaders(), headers) def test...
b'foo')
64
8
urllib3/urllib3
train
35
7bacb2c14acc9e189abbb475695425352dc215da
train
test/test_response.py
train
urllib3/urllib3:test/test_response.py
53
8
self.assertRaises
test_decode_bad_data
import unittest import zlib from io import BytesIO from urllib3.response import HTTPResponse class TestLegacyResponse(unittest.TestCase): def test_getheaders(self): headers = {'host': 'example.com'} r = HTTPResponse(headers=headers) self.assertEqual(r.getheaders(), headers) def test_...
zlib.error)
modified
646170111e61a7be114e2644733ebb86f307d1465f67ee380ab435da4437c576
self.assertRaises|test_decode_bad_data|import unittest import zlib from io import BytesIO from urllib3.response import HTTPResponse class TestLegacyResponse(unittest.TestCase): def test_getheaders(self): headers = {'host': 'example.com'} r = HTTPResponse(headers=headers) self.assertEqual(r.getheaders(), headers) def te...
zlib.error)
53
8
urllib3/urllib3
train
35
7bacb2c14acc9e189abbb475695425352dc215da
train
test/test_response.py
train
urllib3/urllib3:test/test_response.py
64
8
self.assertEqual
test_decode_deflate
import unittest import zlib from io import BytesIO from urllib3.response import HTTPResponse class TestLegacyResponse(unittest.TestCase): def test_getheaders(self): headers = {'host': 'example.com'} r = HTTPResponse(headers=headers) self.assertEqual(r.getheaders(), headers) def test_...
b'foo')
modified
6ed8bab4f532e0c3fbc98cb265f8b4337449f3d1ad0cb6f733a5429f399101b2
self.assertEqual|test_decode_deflate|import unittest import zlib from io import BytesIO from urllib3.response import HTTPResponse class TestLegacyResponse(unittest.TestCase): def test_getheaders(self): headers = {'host': 'example.com'} r = HTTPResponse(headers=headers) self.assertEqual(r.getheaders(), headers) def test...
b'foo')
64
8
urllib3/urllib3
train
36
ee76a8e648999e7c8ada3b28a424573ba341b19b
train
test/with_dummyserver/test_poolmanager.py
train
urllib3/urllib3:test/with_dummyserver/test_poolmanager.py
63
8
self.assertEqual
test_missing_port
import unittest from dummyserver.testcase import HTTPDummyServerTestCase from urllib3.connectionpool import port_by_scheme from urllib3.poolmanager import PoolManager from urllib3.exceptions import MaxRetryError class TestPoolManager(HTTPDummyServerTestCase): base_url = 'http://%s:%d' % (HTTPDummyServerTestCase....
b'Dummy server!')
modified
5a9d7f76f880f93d3af664664785710d305d724aab6f520754fbf3423e4e9b12
self.assertEqual|test_missing_port|import unittest from dummyserver.testcase import HTTPDummyServerTestCase from urllib3.connectionpool import port_by_scheme from urllib3.poolmanager import PoolManager from urllib3.exceptions import MaxRetryError class TestPoolManager(HTTPDummyServerTestCase): base_url = 'http://%s:%d'...
'Dummy server!')
63
8
urllib3/urllib3
train
37
f56d639416b18d5abded783d8305f166bc5dfcf8
train
test/with_dummyserver/test_socket_closing.py
train
urllib3/urllib3:test/with_dummyserver/test_socket_closing.py
41
8
self.assertEqual
test_recovery_when_server_closes_connection
from urllib3 import HTTPConnectionPool, PoolManager from urllib3.connectionpool import port_by_scheme from dummyserver.testcase import SocketDummyServerTestCase from threading import Event class TestSocketClosing(SocketDummyServerTestCase): def test_recovery_when_server_closes_connection(self): # Does ...
b'Response 0')
modified
77204520341214bb32a06d9e0a5928647b4cd71ef5d734885a55b73e305e2197
self.assertEqual|test_recovery_when_server_closes_connection|from urllib3 import HTTPConnectionPool, PoolManager from urllib3.connectionpool import port_by_scheme from dummyserver.testcase import SocketDummyServerTestCase from threading import Event class TestSocketClosing(SocketDummyServerTestCase): def test_recovery_...
'Response 0')
41
8
urllib3/urllib3
train
37
f56d639416b18d5abded783d8305f166bc5dfcf8
train
test/with_dummyserver/test_socket_closing.py
train
urllib3/urllib3:test/with_dummyserver/test_socket_closing.py
47
8
self.assertEqual
test_recovery_when_server_closes_connection
from urllib3 import HTTPConnectionPool, PoolManager from urllib3.connectionpool import port_by_scheme from dummyserver.testcase import SocketDummyServerTestCase from threading import Event class TestSocketClosing(SocketDummyServerTestCase): def test_recovery_when_server_closes_connection(self): # Does ...
b'Response 1')
modified
d0726487596509e91b27ca2c8c042b47162dcadaf0b41485b8cdabb357cac110
self.assertEqual|test_recovery_when_server_closes_connection|from urllib3 import HTTPConnectionPool, PoolManager from urllib3.connectionpool import port_by_scheme from dummyserver.testcase import SocketDummyServerTestCase from threading import Event class TestSocketClosing(SocketDummyServerTestCase): def test_recovery_...
'Response 1')
47
8
urllib3/urllib3
train
38
46497e05385933a92d30ff700a75898d36bbb363
train
test/with_dummyserver/test_https.py
train
urllib3/urllib3:test/with_dummyserver/test_https.py
33
8
self.assertRaises
test_verified
import logging import sys import unittest from dummyserver.testcase import HTTPSDummyServerTestCase from dummyserver.server import DEFAULT_CA, DEFAULT_CA_BAD from urllib3 import HTTPSConnectionPool from urllib3.connectionpool import VerifiedHTTPSConnection from urllib3.exceptions import SSLError log = logging.getLo...
SSLError)
added
11e69bf993433d0c46c3b754d97e8f2fcc9f98e490f1abdb5cdfc09bd1e57b81
self.assertRaises|test_verified|import logging import sys import unittest from dummyserver.testcase import HTTPSDummyServerTestCase from dummyserver.server import DEFAULT_CA, DEFAULT_CA_BAD from urllib3 import HTTPSConnectionPool from urllib3.connectionpool import VerifiedHTTPSConnection from urllib3.exceptions import ...
null
null
null
urllib3/urllib3
train
38
46497e05385933a92d30ff700a75898d36bbb363
train
test/with_dummyserver/test_https.py
train
urllib3/urllib3:test/with_dummyserver/test_https.py
41
12
self.assertTrue
test_verified
import logging import sys import unittest from dummyserver.testcase import HTTPSDummyServerTestCase from dummyserver.server import DEFAULT_CA, DEFAULT_CA_BAD from urllib3 import HTTPSConnectionPool from urllib3.connectionpool import VerifiedHTTPSConnection from urllib3.exceptions import SSLError log = logging.getLo...
'certificate verify failed' in str(e))
added
d68f307d4bd136a311aa7ff788d10ef5876af3f847db48ec95324d1d817aaa87
self.assertTrue|test_verified|import logging import sys import unittest from dummyserver.testcase import HTTPSDummyServerTestCase from dummyserver.server import DEFAULT_CA, DEFAULT_CA_BAD from urllib3 import HTTPSConnectionPool from urllib3.connectionpool import VerifiedHTTPSConnection from urllib3.exceptions import SS...
null
null
null
urllib3/urllib3
train
38
46497e05385933a92d30ff700a75898d36bbb363
train
test/with_dummyserver/test_https.py
train
urllib3/urllib3:test/with_dummyserver/test_https.py
55
12
self.assertTrue
test_verified
import logging import sys import unittest from dummyserver.testcase import HTTPSDummyServerTestCase from dummyserver.server import DEFAULT_CA, DEFAULT_CA_BAD from urllib3 import HTTPSConnectionPool from urllib3.connectionpool import VerifiedHTTPSConnection from urllib3.exceptions import SSLError log = logging.getLo...
"doesn't match" in str(e))
modified
850227ab22e8e011f0e49169fb7612cd711cb16fbbcaabea28b3b7685bf7cd88
self.assertTrue|test_verified|import logging import sys import unittest from dummyserver.testcase import HTTPSDummyServerTestCase from dummyserver.server import DEFAULT_CA, DEFAULT_CA_BAD from urllib3 import HTTPSConnectionPool from urllib3.connectionpool import VerifiedHTTPSConnection from urllib3.exceptions import SS...
"doesn't match" in str(e))
58
12
urllib3/urllib3
train
39
074fac227118d8e844dac20e29c5d7ad938c3c96
train
test/with_dummyserver/test_https.py
train
urllib3/urllib3:test/with_dummyserver/test_https.py
66
8
self.assertRaises
test_no_ssl
import logging import sys import unittest from dummyserver.testcase import HTTPSDummyServerTestCase from dummyserver.server import DEFAULT_CA, DEFAULT_CA_BAD from urllib3 import HTTPSConnectionPool from urllib3.connectionpool import VerifiedHTTPSConnection from urllib3.exceptions import SSLError log = logging.getLo...
SSLError)
added
6d905131decb01c50a16ee11d3247c4ef4e86b7d0f58be5efb8a4f473ecbeb5c
self.assertRaises|test_no_ssl|import logging import sys import unittest from dummyserver.testcase import HTTPSDummyServerTestCase from dummyserver.server import DEFAULT_CA, DEFAULT_CA_BAD from urllib3 import HTTPSConnectionPool from urllib3.connectionpool import VerifiedHTTPSConnection from urllib3.exceptions import SS...
null
null
null
urllib3/urllib3
train
39
074fac227118d8e844dac20e29c5d7ad938c3c96
train
test/with_dummyserver/test_https.py
train
urllib3/urllib3:test/with_dummyserver/test_https.py
68
8
self.assertRaises
test_no_ssl
import logging import sys import unittest from dummyserver.testcase import HTTPSDummyServerTestCase from dummyserver.server import DEFAULT_CA, DEFAULT_CA_BAD from urllib3 import HTTPSConnectionPool from urllib3.connectionpool import VerifiedHTTPSConnection from urllib3.exceptions import SSLError log = logging.getLo...
SSLError)
added
18b718430443fcc844ceac839f7899efa65d3b743bd06a840460295006e6096e
self.assertRaises|test_no_ssl|import logging import sys import unittest from dummyserver.testcase import HTTPSDummyServerTestCase from dummyserver.server import DEFAULT_CA, DEFAULT_CA_BAD from urllib3 import HTTPSConnectionPool from urllib3.connectionpool import VerifiedHTTPSConnection from urllib3.exceptions import SS...
null
null
null
urllib3/urllib3
train
40
f4089584ae04e6de6e96b4335e73bacfc0247033
train
test/test_connectionpool.py
train
urllib3/urllib3:test/test_connectionpool.py
55
12
self.assertFalse
test_same_host
import unittest from urllib3.connectionpool import ( connection_from_url, get_host, HTTPConnectionPool, make_headers) from urllib3.exceptions import EmptyPoolError class TestConnectionPool(unittest.TestCase): def test_get_host(self): url_host_map = { 'http://google.com/mail':...
c.is_same_host(b))
modified
4797b5554cd1487ed5b4af968e94b799ab4a88a935a6bcf69c3c5f4a3ceb3358
self.assertFalse|test_same_host|import unittest from urllib3.connectionpool import ( connection_from_url, get_host, HTTPConnectionPool, make_headers) from urllib3.exceptions import EmptyPoolError class TestConnectionPool(unittest.TestCase): def test_get_host(self): url_host_map = { 'http://google.com/mail': ('http', 'g...
c.is_same_host(b))
53
12
urllib3/urllib3
train
40
f4089584ae04e6de6e96b4335e73bacfc0247033
train
test/test_connectionpool.py
train
urllib3/urllib3:test/test_connectionpool.py
70
8
self.assertEqual
test_make_headers
import unittest from urllib3.connectionpool import ( connection_from_url, get_host, HTTPConnectionPool, make_headers) from urllib3.exceptions import EmptyPoolError class TestConnectionPool(unittest.TestCase): def test_get_host(self): url_host_map = { 'http://google.com/mail':...
{'accept-encoding': 'gzip,deflate', 'user-agent': 'banana'})
modified
57fe92d5988761e36cf44f972c9d3f75ebd62a53db71d51a00d5f9232bbadd50
self.assertEqual|test_make_headers|import unittest from urllib3.connectionpool import ( connection_from_url, get_host, HTTPConnectionPool, make_headers) from urllib3.exceptions import EmptyPoolError class TestConnectionPool(unittest.TestCase): def test_get_host(self): url_host_map = { 'http://google.com/mail': ('http',...
{'accept-encoding': 'gzip,deflate', 'user-agent': 'banana'})
68
8
urllib3/urllib3
train
40
f4089584ae04e6de6e96b4335e73bacfc0247033
train
test/test_connectionpool.py
train
urllib3/urllib3:test/test_connectionpool.py
114
8
self.assertEqual
test_pool_edgecases
import unittest from urllib3.connectionpool import ( connection_from_url, get_host, HTTPConnectionPool, make_headers) from urllib3.exceptions import EmptyPoolError class TestConnectionPool(unittest.TestCase): def test_get_host(self): url_host_map = { 'http://google.com/mail':...
pool._get_conn())
added
362be6ccf6612aba2a33a7457f54e337196c1009f154939bcb23fed951d067b0
self.assertEqual|test_pool_edgecases|import unittest from urllib3.connectionpool import ( connection_from_url, get_host, HTTPConnectionPool, make_headers) from urllib3.exceptions import EmptyPoolError class TestConnectionPool(unittest.TestCase): def test_get_host(self): url_host_map = { 'http://google.com/mail': ('http...
null
null
null
urllib3/urllib3
train
40
f4089584ae04e6de6e96b4335e73bacfc0247033
train
test/test_connectionpool.py
train
urllib3/urllib3:test/test_connectionpool.py
120
8
self.assertEqual
test_exception_str
import unittest from urllib3.connectionpool import ( connection_from_url, get_host, HTTPConnectionPool, make_headers) from urllib3.exceptions import EmptyPoolError class TestConnectionPool(unittest.TestCase): def test_get_host(self): url_host_map = { 'http://google.com/mail':...
"HTTPConnectionPool(host='localhost', port=None): Test.")
added
9a4583102625b87b3111570b5f7992315b915deca7ffab5af3e3648b955d0adb
self.assertEqual|test_exception_str|import unittest from urllib3.connectionpool import ( connection_from_url, get_host, HTTPConnectionPool, make_headers) from urllib3.exceptions import EmptyPoolError class TestConnectionPool(unittest.TestCase): def test_get_host(self): url_host_map = { 'http://google.com/mail': ('http'...
null
null
null
urllib3/urllib3
train
41
0e093823c2179362d82b6d00283d8b8d4f83a505
train
test/with_dummyserver/test_poolmanager.py
train
urllib3/urllib3:test/with_dummyserver/test_poolmanager.py
26
8
self.assertEqual
test_redirect
import unittest from dummyserver.testcase import HTTPDummyServerTestCase from urllib3.poolmanager import PoolManager from urllib3.connectionpool import port_by_scheme from urllib3.exceptions import MaxRetryError class TestPoolManager(HTTPDummyServerTestCase): base_url = 'http://%s:%d' % (HTTPDummyServerTestCase....
b'Dummy server!')
modified
f66429db7fea7ad887177e3abd81c63ddde63e871ef148d046fbe07dc84cff70
self.assertEqual|test_redirect|import unittest from dummyserver.testcase import HTTPDummyServerTestCase from urllib3.poolmanager import PoolManager from urllib3.connectionpool import port_by_scheme from urllib3.exceptions import MaxRetryError class TestPoolManager(HTTPDummyServerTestCase): base_url = 'http://%s:%d' % (...
b'Dummy server!')
26
8
urllib3/urllib3
train
41
0e093823c2179362d82b6d00283d8b8d4f83a505
train
test/with_dummyserver/test_poolmanager.py
train
urllib3/urllib3:test/with_dummyserver/test_poolmanager.py
45
8
self.assertEqual
test_cross_host_redirect
import unittest from dummyserver.testcase import HTTPDummyServerTestCase from urllib3.poolmanager import PoolManager from urllib3.connectionpool import port_by_scheme from urllib3.exceptions import MaxRetryError class TestPoolManager(HTTPDummyServerTestCase): base_url = 'http://%s:%d' % (HTTPDummyServerTestCase....
self.host_alt)
modified
2a890f6f48c7e5182bc87f0ab879572e647c2e66dc2a8199ddc15eb9ac8f1160
self.assertEqual|test_cross_host_redirect|import unittest from dummyserver.testcase import HTTPDummyServerTestCase from urllib3.poolmanager import PoolManager from urllib3.connectionpool import port_by_scheme from urllib3.exceptions import MaxRetryError class TestPoolManager(HTTPDummyServerTestCase): base_url = 'http:/...
self.host_alt)
45
8
urllib3/urllib3
train
41
0e093823c2179362d82b6d00283d8b8d4f83a505
train
test/with_dummyserver/test_poolmanager.py
train
urllib3/urllib3:test/with_dummyserver/test_poolmanager.py
63
8
self.assertEqual
test_missing_port
import unittest from dummyserver.testcase import HTTPDummyServerTestCase from urllib3.poolmanager import PoolManager from urllib3.connectionpool import port_by_scheme from urllib3.exceptions import MaxRetryError class TestPoolManager(HTTPDummyServerTestCase): base_url = 'http://%s:%d' % (HTTPDummyServerTestCase....
b'Dummy server!')
modified
ff9f6f06dce30e587d9b50248adb7dcc1516d34ef0349bff52a94081745b9c70
self.assertEqual|test_missing_port|import unittest from dummyserver.testcase import HTTPDummyServerTestCase from urllib3.poolmanager import PoolManager from urllib3.connectionpool import port_by_scheme from urllib3.exceptions import MaxRetryError class TestPoolManager(HTTPDummyServerTestCase): base_url = 'http://%s:%d'...
b'Dummy server!')
63
8
urllib3/urllib3
train
41
0e093823c2179362d82b6d00283d8b8d4f83a505
train
test/with_dummyserver/test_socket_closing.py
train
urllib3/urllib3:test/with_dummyserver/test_socket_closing.py
41
8
self.assertEqual
test_recovery_when_server_closes_connection
from urllib3 import HTTPConnectionPool from urllib3.poolmanager import ProxyManager, proxy_from_url from dummyserver.testcase import SocketDummyServerTestCase from threading import Event class TestSocketClosing(SocketDummyServerTestCase): def test_recovery_when_server_closes_connection(self): # Does th...
b'Response 0')
modified
ea1316bac2492b3546cbfd2583e1a77b241db6d3a06438e189482c5ce36a21ab
self.assertEqual|test_recovery_when_server_closes_connection|from urllib3 import HTTPConnectionPool from urllib3.poolmanager import ProxyManager, proxy_from_url from dummyserver.testcase import SocketDummyServerTestCase from threading import Event class TestSocketClosing(SocketDummyServerTestCase): def test_recovery_wh...
b'Response 0')
41
8
urllib3/urllib3
train
41
0e093823c2179362d82b6d00283d8b8d4f83a505
train
test/with_dummyserver/test_socket_closing.py
train
urllib3/urllib3:test/with_dummyserver/test_socket_closing.py
47
8
self.assertEqual
test_recovery_when_server_closes_connection
from urllib3 import HTTPConnectionPool from urllib3.poolmanager import ProxyManager, proxy_from_url from dummyserver.testcase import SocketDummyServerTestCase from threading import Event class TestSocketClosing(SocketDummyServerTestCase): def test_recovery_when_server_closes_connection(self): # Does th...
b'Response 1')
modified
5b42f8d278a02b0564e95d68dc4d10606f9a2833065bdaf5312c6141c8a4cfe2
self.assertEqual|test_recovery_when_server_closes_connection|from urllib3 import HTTPConnectionPool from urllib3.poolmanager import ProxyManager, proxy_from_url from dummyserver.testcase import SocketDummyServerTestCase from threading import Event class TestSocketClosing(SocketDummyServerTestCase): def test_recovery_wh...
b'Response 1')
47
8
urllib3/urllib3
train
41
0e093823c2179362d82b6d00283d8b8d4f83a505
train
test/with_dummyserver/test_socket_closing.py
train
urllib3/urllib3:test/with_dummyserver/test_socket_closing.py
75
8
self.assertEqual
test_simple
from urllib3 import HTTPConnectionPool from urllib3.poolmanager import ProxyManager, proxy_from_url from dummyserver.testcase import SocketDummyServerTestCase from threading import Event class TestSocketClosing(SocketDummyServerTestCase): def test_recovery_when_server_closes_connection(self): # Does th...
b'GET http://google.com/ HTTP/1.1\r\n' b'Host: google.com\r\n' b'Accept-Encoding: identity\r\n' b'Proxy-Connection: Keep-Alive\r\n' b'Accept: */*\r\n' b'\r\n')
added
61dec676e8f713a111ed95958e1ed1b69e9d2c5bb8d58a1307cc7a531512c91d
self.assertEqual|test_simple|from urllib3 import HTTPConnectionPool from urllib3.poolmanager import ProxyManager, proxy_from_url from dummyserver.testcase import SocketDummyServerTestCase from threading import Event class TestSocketClosing(SocketDummyServerTestCase): def test_recovery_when_server_closes_connection(self...
null
null
null
urllib3/urllib3
train
42
86cf15473413ecf15c513ada57e36ff25ceb9776
train
test/with_dummyserver/test_connectionpool.py
train
urllib3/urllib3:test/with_dummyserver/test_connectionpool.py
243
8
self.assertEqual
test_partial_response
import logging import sys import unittest try: from urllib.parse import urlencode except: from urllib import urlencode from urllib3 import encode_multipart_formdata, HTTPConnectionPool from urllib3.exceptions import TimeoutError, EmptyPoolError, MaxRetryError from urllib3.packages.six import u from dummyserv...
resp_data[5:])
added
b1b34e0248af372f9652f0e0c73ec8de1611714b9d3b3a4338fe0b352126048a
self.assertEqual|test_partial_response|import logging import sys import unittest try: from urllib.parse import urlencode except: from urllib import urlencode from urllib3 import encode_multipart_formdata, HTTPConnectionPool from urllib3.exceptions import TimeoutError, EmptyPoolError, MaxRetryError from urllib3.packages...
null
null
null
urllib3/urllib3
train
42
86cf15473413ecf15c513ada57e36ff25ceb9776
train
test/with_dummyserver/test_connectionpool.py
train
urllib3/urllib3:test/with_dummyserver/test_connectionpool.py
275
12
self.assertEqual
test_lazy_load_twice
import logging import sys import unittest try: from urllib.parse import urlencode except: from urllib import urlencode from urllib3 import encode_multipart_formdata, HTTPConnectionPool from urllib3.exceptions import TimeoutError, EmptyPoolError, MaxRetryError from urllib3.packages.six import u from dummyserv...
resp_data[first_chunk:])
added
5007ce2d9cae0bd94ffe1d52d97a36d1f3d779d841079ec437bb1394c3b8d723
self.assertEqual|test_lazy_load_twice|import logging import sys import unittest try: from urllib.parse import urlencode except: from urllib import urlencode from urllib3 import encode_multipart_formdata, HTTPConnectionPool from urllib3.exceptions import TimeoutError, EmptyPoolError, MaxRetryError from urllib3.packages....
null
null
null
urllib3/urllib3
train
42
86cf15473413ecf15c513ada57e36ff25ceb9776
train
test/with_dummyserver/test_connectionpool.py
train
urllib3/urllib3:test/with_dummyserver/test_connectionpool.py
313
8
self.assertEqual
test_for_double_release
import logging import sys import unittest try: from urllib.parse import urlencode except: from urllib import urlencode from urllib3 import encode_multipart_formdata, HTTPConnectionPool from urllib3.exceptions import TimeoutError, EmptyPoolError, MaxRetryError from urllib3.packages.six import u from dummyserv...
MAXSIZE-2)
added
4af0a090c00dc4c898c0157b59fecccdb9aa65c733575dd5d7c77b90cf301aca
self.assertEqual|test_for_double_release|import logging import sys import unittest try: from urllib.parse import urlencode except: from urllib import urlencode from urllib3 import encode_multipart_formdata, HTTPConnectionPool from urllib3.exceptions import TimeoutError, EmptyPoolError, MaxRetryError from urllib3.packag...
null
null
null
urllib3/urllib3
train
42
86cf15473413ecf15c513ada57e36ff25ceb9776
train
test/with_dummyserver/test_connectionpool.py
train
urllib3/urllib3:test/with_dummyserver/test_connectionpool.py
322
8
self.assertEqual
test_release_conn_parameter
import logging import sys import unittest try: from urllib.parse import urlencode except: from urllib import urlencode from urllib3 import encode_multipart_formdata, HTTPConnectionPool from urllib3.exceptions import TimeoutError, EmptyPoolError, MaxRetryError from urllib3.packages.six import u from dummyserv...
MAXSIZE-1)
added
dac1883566726df5bbc0b5cd4f1fd00bf1d8d0acd56ba42edfafad574d34291d
self.assertEqual|test_release_conn_parameter|import logging import sys import unittest try: from urllib.parse import urlencode except: from urllib import urlencode from urllib3 import encode_multipart_formdata, HTTPConnectionPool from urllib3.exceptions import TimeoutError, EmptyPoolError, MaxRetryError from urllib3.pa...
null
null
null
urllib3/urllib3
train
43
247b68b6610dd4e38e35ba3d5ada19a40c706d6b
train
test/test_connectionpool.py
train
urllib3/urllib3:test/test_connectionpool.py
43
12
self.assertTrue
test_same_host
import unittest from urllib3.connectionpool import ( connection_from_url, get_host, HTTPConnectionPool, make_headers) from urllib3.exceptions import EmptyPoolError, LocationParseError class TestConnectionPool(unittest.TestCase): def test_get_host(self): url_host_map = { 'http...
c.is_same_host(b))
modified
532f60c3c853f3f1984dbba97c0ade06dbc60efb97447b35270ce0dc54bae2c9
self.assertTrue|test_same_host|import unittest from urllib3.connectionpool import ( connection_from_url, get_host, HTTPConnectionPool, make_headers) from urllib3.exceptions import EmptyPoolError, LocationParseError class TestConnectionPool(unittest.TestCase): def test_get_host(self): url_host_map = { 'http://google.com...
c.is_same_host(b))
43
12
urllib3/urllib3
train
43
247b68b6610dd4e38e35ba3d5ada19a40c706d6b
train
test/test_connectionpool.py
train
urllib3/urllib3:test/test_connectionpool.py
64
12
self.assertRaises
test_invalid_host
import unittest from urllib3.connectionpool import ( connection_from_url, get_host, HTTPConnectionPool, make_headers) from urllib3.exceptions import EmptyPoolError, LocationParseError class TestConnectionPool(unittest.TestCase): def test_get_host(self): url_host_map = { 'http...
LocationParseError)
added
d2c039acc67e8b54d3b0a2260df8ab3af90c38c79c3f0556be1c21d06ba66fcc
self.assertRaises|test_invalid_host|import unittest from urllib3.connectionpool import ( connection_from_url, get_host, HTTPConnectionPool, make_headers) from urllib3.exceptions import EmptyPoolError, LocationParseError class TestConnectionPool(unittest.TestCase): def test_get_host(self): url_host_map = { 'http://googl...
null
null
null
urllib3/urllib3
train
43
247b68b6610dd4e38e35ba3d5ada19a40c706d6b
train
test/test_connectionpool.py
train
urllib3/urllib3:test/test_connectionpool.py
125
8
self.assertNotEqual
test_pool_edgecases
import unittest from urllib3.connectionpool import ( connection_from_url, get_host, HTTPConnectionPool, make_headers) from urllib3.exceptions import EmptyPoolError, LocationParseError class TestConnectionPool(unittest.TestCase): def test_get_host(self): url_host_map = { 'http...
pool._get_conn())
added
856a4c49f4a46b2082855e2391b12d6f5949389aa6330875c568fac409d8439b
self.assertNotEqual|test_pool_edgecases|import unittest from urllib3.connectionpool import ( connection_from_url, get_host, HTTPConnectionPool, make_headers) from urllib3.exceptions import EmptyPoolError, LocationParseError class TestConnectionPool(unittest.TestCase): def test_get_host(self): url_host_map = { 'http://g...
null
null
null
urllib3/urllib3
train
43
247b68b6610dd4e38e35ba3d5ada19a40c706d6b
train
test/test_connectionpool.py
train
urllib3/urllib3:test/test_connectionpool.py
130
8
self.assertEqual
test_exception_str
import unittest from urllib3.connectionpool import ( connection_from_url, get_host, HTTPConnectionPool, make_headers) from urllib3.exceptions import EmptyPoolError, LocationParseError class TestConnectionPool(unittest.TestCase): def test_get_host(self): url_host_map = { 'http...
"HTTPConnectionPool(host='localhost', port=None): Test.")
added
d1f3601bd5426788004e9cf4ceed5772e5d3e3d7b6eaddf496241587cc15db61
self.assertEqual|test_exception_str|import unittest from urllib3.connectionpool import ( connection_from_url, get_host, HTTPConnectionPool, make_headers) from urllib3.exceptions import EmptyPoolError, LocationParseError class TestConnectionPool(unittest.TestCase): def test_get_host(self): url_host_map = { 'http://googl...
null
null
null
urllib3/urllib3
train
44
bca8c7af84b73594fc6fc2ca30f1f4a69929e5f5
train
test/test_connectionpool.py
train
urllib3/urllib3:test/test_connectionpool.py
51
12
self.assertFalse
test_same_host
import unittest from urllib3.connectionpool import connection_from_url, HTTPConnectionPool from urllib3.util import get_host, make_headers from urllib3.exceptions import EmptyPoolError, LocationParseError class TestConnectionPool(unittest.TestCase): def test_get_host(self): url_host_map = { '...
c.is_same_host(b))
added
4e9f04ca9f7b9246806c95e23c73ecac223d9e9fb333565c5c86c65168007f6c
self.assertFalse|test_same_host|import unittest from urllib3.connectionpool import connection_from_url, HTTPConnectionPool from urllib3.util import get_host, make_headers from urllib3.exceptions import EmptyPoolError, LocationParseError class TestConnectionPool(unittest.TestCase): def test_get_host(self): url_host_map ...
null
null
null
urllib3/urllib3
train
44
bca8c7af84b73594fc6fc2ca30f1f4a69929e5f5
train
test/test_connectionpool.py
train
urllib3/urllib3:test/test_connectionpool.py
60
12
self.assertRaises
test_invalid_host
import unittest from urllib3.connectionpool import connection_from_url, HTTPConnectionPool from urllib3.util import get_host, make_headers from urllib3.exceptions import EmptyPoolError, LocationParseError class TestConnectionPool(unittest.TestCase): def test_get_host(self): url_host_map = { '...
LocationParseError)
added
22da98f5cc8df7f76664cbbe4e0262e67f2412e3d0397fad531dfeb5500bae52
self.assertRaises|test_invalid_host|import unittest from urllib3.connectionpool import connection_from_url, HTTPConnectionPool from urllib3.util import get_host, make_headers from urllib3.exceptions import EmptyPoolError, LocationParseError class TestConnectionPool(unittest.TestCase): def test_get_host(self): url_host_...
null
null
null
urllib3/urllib3
train
44
bca8c7af84b73594fc6fc2ca30f1f4a69929e5f5
train
test/test_filepost.py
val
urllib3/urllib3:test/test_filepost.py
14
12
self.assertEqual
test_dict
import unittest from urllib3.filepost import encode_multipart_formdata, iter_fields from urllib3.packages.six import b, u BOUNDARY = '!! test boundary !!' class TestIterfields(unittest.TestCase): def test_dict(self): for fieldname, value in iter_fields(dict(a='b')): self.assertEqual((field...
('a', 'b'))
added
fabd5333f61560ef87f3db6a88b6c90b0a479d122b468ffa2eb1a38fdfb5b11c
self.assertEqual|test_dict|import unittest from urllib3.filepost import encode_multipart_formdata, iter_fields from urllib3.packages.six import b, u BOUNDARY = '!! test boundary !!' class TestIterfields(unittest.TestCase): def test_dict(self): for fieldname, value in iter_fields(dict(a='b')): self.assertEqual((fieldnam...
null
null
null
urllib3/urllib3
train
44
bca8c7af84b73594fc6fc2ca30f1f4a69929e5f5
train
test/test_filepost.py
val
urllib3/urllib3:test/test_filepost.py
24
8
self.assertEqual
test_tuple_list
import unittest from urllib3.filepost import encode_multipart_formdata, iter_fields from urllib3.packages.six import b, u BOUNDARY = '!! test boundary !!' class TestIterfields(unittest.TestCase): def test_dict(self): for fieldname, value in iter_fields(dict(a='b')): self.assertEqual((field...
[('a', 'b'), ('c', 'd')])
added
d6d331fefa8d578d701a9f256638fceb0b70146ba7f59c00f3624c6ff405443a
self.assertEqual|test_tuple_list|import unittest from urllib3.filepost import encode_multipart_formdata, iter_fields from urllib3.packages.six import b, u BOUNDARY = '!! test boundary !!' class TestIterfields(unittest.TestCase): def test_dict(self): for fieldname, value in iter_fields(dict(a='b')): self.assertEqual((fi...
null
null
null
urllib3/urllib3
train
44
bca8c7af84b73594fc6fc2ca30f1f4a69929e5f5
train
test/with_dummyserver/test_connectionpool.py
train
urllib3/urllib3:test/with_dummyserver/test_connectionpool.py
185
8
self.assertEqual
test_post_with_urlencode
import logging import sys import unittest try: from urllib.parse import urlencode except: from urllib import urlencode from urllib3 import encode_multipart_formdata, HTTPConnectionPool from urllib3.exceptions import TimeoutError, EmptyPoolError, MaxRetryError from urllib3.packages.six import u from dummyserv...
urlencode(data))
added
ba1b7d96a9f08d354b1c2d4188d3b2430a4df206860cb4b6ab0a9d14d1c1d9cb
self.assertEqual|test_post_with_urlencode|import logging import sys import unittest try: from urllib.parse import urlencode except: from urllib import urlencode from urllib3 import encode_multipart_formdata, HTTPConnectionPool from urllib3.exceptions import TimeoutError, EmptyPoolError, MaxRetryError from urllib3.packa...
null
null
null
urllib3/urllib3
train
44
bca8c7af84b73594fc6fc2ca30f1f4a69929e5f5
train
test/with_dummyserver/test_connectionpool.py
train
urllib3/urllib3:test/with_dummyserver/test_connectionpool.py
216
8
self.assertEqual
test_check_gzip
import logging import sys import unittest try: from urllib.parse import urlencode except: from urllib import urlencode from urllib3 import encode_multipart_formdata, HTTPConnectionPool from urllib3.exceptions import TimeoutError, EmptyPoolError, MaxRetryError from urllib3.packages.six import u from dummyserv...
b'hello, world!')
added
52661017c6919a5a529b9ce36bf9ae1da0490346a88736f2e908cf9077a1d82e
self.assertEqual|test_check_gzip|import logging import sys import unittest try: from urllib.parse import urlencode except: from urllib import urlencode from urllib3 import encode_multipart_formdata, HTTPConnectionPool from urllib3.exceptions import TimeoutError, EmptyPoolError, MaxRetryError from urllib3.packages.six i...
null
null
null
urllib3/urllib3
train
44
bca8c7af84b73594fc6fc2ca30f1f4a69929e5f5
train
test/with_dummyserver/test_socketlevel.py
train
urllib3/urllib3:test/with_dummyserver/test_socketlevel.py
62
8
self.assertEqual
test_recovery_when_server_closes_connection
from urllib3 import HTTPConnectionPool from urllib3.poolmanager import proxy_from_url from dummyserver.testcase import SocketDummyServerTestCase from threading import Event class TestCookies(SocketDummyServerTestCase): def test_multi_setcookie(self): def multicookie_response_handler(listener): ...
b'Response 0')
added
ca07c62d5f41f8a330eb96dfd3caeb9cca7b73598acc77d1f5606ee378075383
self.assertEqual|test_recovery_when_server_closes_connection|from urllib3 import HTTPConnectionPool from urllib3.poolmanager import proxy_from_url from dummyserver.testcase import SocketDummyServerTestCase from threading import Event class TestCookies(SocketDummyServerTestCase): def test_multi_setcookie(self): def mult...
null
null
null
urllib3/urllib3
train
44
bca8c7af84b73594fc6fc2ca30f1f4a69929e5f5
train
test/with_dummyserver/test_socketlevel.py
train
urllib3/urllib3:test/with_dummyserver/test_socketlevel.py
96
8
self.assertEqual
test_simple
from urllib3 import HTTPConnectionPool from urllib3.poolmanager import proxy_from_url from dummyserver.testcase import SocketDummyServerTestCase from threading import Event class TestCookies(SocketDummyServerTestCase): def test_multi_setcookie(self): def multicookie_response_handler(listener): ...
b'GET http://google.com/ HTTP/1.1\r\n' b'Host: google.com\r\n' b'Accept-Encoding: identity\r\n' b'Proxy-Connection: Keep-Alive\r\n' b'Accept: */*\r\n' b'\r\n')
added
f212f41fa2978be0aa112c10c0201163d00842ca30ca67692dd5444702ab4e8c
self.assertEqual|test_simple|from urllib3 import HTTPConnectionPool from urllib3.poolmanager import proxy_from_url from dummyserver.testcase import SocketDummyServerTestCase from threading import Event class TestCookies(SocketDummyServerTestCase): def test_multi_setcookie(self): def multicookie_response_handler(listene...
null
null
null
urllib3/urllib3
train
45
b922f870433c629e3e0e90e984d62e3d869d78ea
train
test/test_connectionpool.py
train
urllib3/urllib3:test/test_connectionpool.py
19
12
self.assertTrue
test_same_host
import unittest from urllib3.connectionpool import connection_from_url, HTTPConnectionPool from urllib3.exceptions import EmptyPoolError class TestConnectionPool(unittest.TestCase): def test_same_host(self): same_host = [ ('http://google.com/', '/'), ('http://google.com/', 'http:/...
c.is_same_host(b))
added
e4c2946a881294130e09dd0ebf78d4b118a7b0631468181960911cd8e7cd5a20
self.assertTrue|test_same_host|import unittest from urllib3.connectionpool import connection_from_url, HTTPConnectionPool from urllib3.exceptions import EmptyPoolError class TestConnectionPool(unittest.TestCase): def test_same_host(self): same_host = [ ('http://google.com/', '/'), ('http://google.com/', 'http://google....
null
null
null
urllib3/urllib3
train
45
b922f870433c629e3e0e90e984d62e3d869d78ea
train
test/test_connectionpool.py
train
urllib3/urllib3:test/test_connectionpool.py
31
12
self.assertFalse
test_same_host
import unittest from urllib3.connectionpool import connection_from_url, HTTPConnectionPool from urllib3.exceptions import EmptyPoolError class TestConnectionPool(unittest.TestCase): def test_same_host(self): same_host = [ ('http://google.com/', '/'), ('http://google.com/', 'http:/...
c.is_same_host(b))
added
9175b97741bac9537f781440fe5896924652e4c3ffb2d876822c8f7f8b85cadc
self.assertFalse|test_same_host|import unittest from urllib3.connectionpool import connection_from_url, HTTPConnectionPool from urllib3.exceptions import EmptyPoolError class TestConnectionPool(unittest.TestCase): def test_same_host(self): same_host = [ ('http://google.com/', '/'), ('http://google.com/', 'http://google...
null
null
null
urllib3/urllib3
train
45
b922f870433c629e3e0e90e984d62e3d869d78ea
train
test/test_connectionpool.py
train
urllib3/urllib3:test/test_connectionpool.py
61
8
self.assertEqual
test_pool_edgecases
import unittest from urllib3.connectionpool import connection_from_url, HTTPConnectionPool from urllib3.exceptions import EmptyPoolError class TestConnectionPool(unittest.TestCase): def test_same_host(self): same_host = [ ('http://google.com/', '/'), ('http://google.com/', 'http:/...
pool._get_conn())
added
e91cdcec435b52e4569c5dfc7417803fbac504f30c0008f4c5d401675e6d834b
self.assertEqual|test_pool_edgecases|import unittest from urllib3.connectionpool import connection_from_url, HTTPConnectionPool from urllib3.exceptions import EmptyPoolError class TestConnectionPool(unittest.TestCase): def test_same_host(self): same_host = [ ('http://google.com/', '/'), ('http://google.com/', 'http://g...
null
null
null
urllib3/urllib3
train
45
b922f870433c629e3e0e90e984d62e3d869d78ea
train
test/test_connectionpool.py
train
urllib3/urllib3:test/test_connectionpool.py
67
8
self.assertEqual
test_exception_str
import unittest from urllib3.connectionpool import connection_from_url, HTTPConnectionPool from urllib3.exceptions import EmptyPoolError class TestConnectionPool(unittest.TestCase): def test_same_host(self): same_host = [ ('http://google.com/', '/'), ('http://google.com/', 'http:/...
"HTTPConnectionPool(host='localhost', port=None): Test.")
added
5b417cb99d049c3dc31113f7f462b006e5779586173eff21e6a61031e3e069ad
self.assertEqual|test_exception_str|import unittest from urllib3.connectionpool import connection_from_url, HTTPConnectionPool from urllib3.exceptions import EmptyPoolError class TestConnectionPool(unittest.TestCase): def test_same_host(self): same_host = [ ('http://google.com/', '/'), ('http://google.com/', 'http://go...
null
null
null
urllib3/urllib3
train
45
b922f870433c629e3e0e90e984d62e3d869d78ea
train
test/test_util.py
train
urllib3/urllib3:test/test_util.py
61
12
self.assertRaises
test_invalid_host
import unittest from urllib3.util import get_host, make_headers, split_first from urllib3.exceptions import LocationParseError class TestUtil(unittest.TestCase): def test_get_host(self): url_host_map = { # Hosts 'http://google.com/mail': ('http', 'google.com', None), '...
LocationParseError)
added
f7e72b978949e1529f059953891806c779bde9bbf92504a47d6a91274e855048
self.assertRaises|test_invalid_host|import unittest from urllib3.util import get_host, make_headers, split_first from urllib3.exceptions import LocationParseError class TestUtil(unittest.TestCase): def test_get_host(self): url_host_map = { # Hosts 'http://google.com/mail': ('http', 'google.com', None), 'http://google.c...
null
null
null
urllib3/urllib3
train
45
b922f870433c629e3e0e90e984d62e3d869d78ea
train
test/test_util.py
train
urllib3/urllib3:test/test_util.py
77
8
self.assertEqual
test_make_headers
import unittest from urllib3.util import get_host, make_headers, split_first from urllib3.exceptions import LocationParseError class TestUtil(unittest.TestCase): def test_get_host(self): url_host_map = { # Hosts 'http://google.com/mail': ('http', 'google.com', None), '...
{'accept-encoding': 'gzip,deflate', 'user-agent': 'banana'})
added
790d38f663b26a2c9e8ae012ebf9d42ef588a435c64cb051e2e642926cfabe8f
self.assertEqual|test_make_headers|import unittest from urllib3.util import get_host, make_headers, split_first from urllib3.exceptions import LocationParseError class TestUtil(unittest.TestCase): def test_get_host(self): url_host_map = { # Hosts 'http://google.com/mail': ('http', 'google.com', None), 'http://google.co...
null
null
null
urllib3/urllib3
train
45
b922f870433c629e3e0e90e984d62e3d869d78ea
train
test/test_util.py
train
urllib3/urllib3:test/test_util.py
81
8
self.assertEqual
test_make_headers
import unittest from urllib3.util import get_host, make_headers, split_first from urllib3.exceptions import LocationParseError class TestUtil(unittest.TestCase): def test_get_host(self): url_host_map = { # Hosts 'http://google.com/mail': ('http', 'google.com', None), '...
{'user-agent': 'banana'})
added
82b6a75d8b5f9badc6dfd1e550bb138b22973a2341c97fa7197c1415d4ce7392
self.assertEqual|test_make_headers|import unittest from urllib3.util import get_host, make_headers, split_first from urllib3.exceptions import LocationParseError class TestUtil(unittest.TestCase): def test_get_host(self): url_host_map = { # Hosts 'http://google.com/mail': ('http', 'google.com', None), 'http://google.co...
null
null
null
urllib3/urllib3
train
45
b922f870433c629e3e0e90e984d62e3d869d78ea
train
test/test_util.py
train
urllib3/urllib3:test/test_util.py
102
12
self.assertEqual
test_split_first
import unittest from urllib3.util import get_host, make_headers, split_first from urllib3.exceptions import LocationParseError class TestUtil(unittest.TestCase): def test_get_host(self): url_host_map = { # Hosts 'http://google.com/mail': ('http', 'google.com', None), '...
expected)
added
c1967c70603931a90895879429d038f0160d3f552fe44a66cf3318b7f5c55403
self.assertEqual|test_split_first|import unittest from urllib3.util import get_host, make_headers, split_first from urllib3.exceptions import LocationParseError class TestUtil(unittest.TestCase): def test_get_host(self): url_host_map = { # Hosts 'http://google.com/mail': ('http', 'google.com', None), 'http://google.com...
null
null
null
urllib3/urllib3
train
46
f7eaa46ff1a96c5f0d209d8f2cedb48e759f522b
train
test/test_collections.py
train
urllib3/urllib3:test/test_collections.py
47
8
self.assertEqual
test_same_key
import unittest from urllib3._collections import RecentlyUsedContainer as Container from urllib3.packages import six xrange = six.moves.xrange class TestLRUContainer(unittest.TestCase): def test_maxsize(self): d = Container(5) for i in xrange(5): d[i] = str(i) self.assertEqu...
['foo'])
added
fb972af4fa567df326506549cad35c9f2720e36c8e61ed2dba212f38853ede2a
self.assertEqual|test_same_key|import unittest from urllib3._collections import RecentlyUsedContainer as Container from urllib3.packages import six xrange = six.moves.xrange class TestLRUContainer(unittest.TestCase): def test_maxsize(self): d = Container(5) for i in xrange(5): d[i] = str(i) self.assertEqual(len(d), 5) ...
null
null
null
urllib3/urllib3
train
46
f7eaa46ff1a96c5f0d209d8f2cedb48e759f522b
train
test/test_collections.py
train
urllib3/urllib3:test/test_collections.py
57
8
self.assertEqual
test_access_ordering
import unittest from urllib3._collections import RecentlyUsedContainer as Container from urllib3.packages import six xrange = six.moves.xrange class TestLRUContainer(unittest.TestCase): def test_maxsize(self): d = Container(5) for i in xrange(5): d[i] = str(i) self.assertEqu...
[5, 6, 7, 8, 9])
added
6ba624b3f6643941b5535ade3612a183098ad98678ec46a404e43dc6c9f15ae5
self.assertEqual|test_access_ordering|import unittest from urllib3._collections import RecentlyUsedContainer as Container from urllib3.packages import six xrange = six.moves.xrange class TestLRUContainer(unittest.TestCase): def test_maxsize(self): d = Container(5) for i in xrange(5): d[i] = str(i) self.assertEqual(len(...
null
null
null
urllib3/urllib3
train
46
f7eaa46ff1a96c5f0d209d8f2cedb48e759f522b
train
test/test_connectionpool.py
train
urllib3/urllib3:test/test_connectionpool.py
139
13
self.assertRaises
test_pool_close
import unittest from urllib3.connectionpool import connection_from_url, HTTPConnectionPool from urllib3.packages.ssl_match_hostname import CertificateError from urllib3.exceptions import ( ClosedPoolError, EmptyPoolError, HostChangedError, MaxRetryError, SSLError, TimeoutError, ) from socket i...
ClosedPoolError)
added
059adb7cc0838a8305cd017eca18d1f4b46576ce7a517a4dc98d5f04ffb30f84
self.assertRaises|test_pool_close|import unittest from urllib3.connectionpool import connection_from_url, HTTPConnectionPool from urllib3.packages.ssl_match_hostname import CertificateError from urllib3.exceptions import ( ClosedPoolError, EmptyPoolError, HostChangedError, MaxRetryError, SSLError, TimeoutError, ) from ...
null
null
null
urllib3/urllib3
train
46
f7eaa46ff1a96c5f0d209d8f2cedb48e759f522b
train
test/test_poolmanager.py
train
urllib3/urllib3:test/test_poolmanager.py
62
13
self.assertRaises
test_manager_clear
import unittest from urllib3.poolmanager import PoolManager from urllib3 import connection_from_url from urllib3.exceptions import ClosedPoolError class TestPoolManager(unittest.TestCase): def test_same_url(self): # Convince ourselves that normally we don't get the same object conn1 = connection_...
ClosedPoolError)
added
6a696eadcb903300b570523fb917a82c24d46124ae5e6048b613fc40ebaa06b1
self.assertRaises|test_manager_clear|import unittest from urllib3.poolmanager import PoolManager from urllib3 import connection_from_url from urllib3.exceptions import ClosedPoolError class TestPoolManager(unittest.TestCase): def test_same_url(self): # Convince ourselves that normally we don't get the same object conn1...
null
null
null
urllib3/urllib3
train
46
f7eaa46ff1a96c5f0d209d8f2cedb48e759f522b
train
test/test_response.py
train
urllib3/urllib3:test/test_response.py
17
8
self.assertEqual
test_getheader
import unittest from io import BytesIO from urllib3.response import HTTPResponse from urllib3.exceptions import DecodeError class TestLegacyResponse(unittest.TestCase): def test_getheaders(self): headers = {'host': 'example.com'} r = HTTPResponse(headers=headers) self.assertEqual(r.gethea...
'example.com')
modified
6046b46e8f636ce4dcf648a2f5f1b3a9621239c9439d931808a4194c2c98f30e
self.assertEqual|test_getheader|import unittest from io import BytesIO from urllib3.response import HTTPResponse from urllib3.exceptions import DecodeError class TestLegacyResponse(unittest.TestCase): def test_getheaders(self): headers = {'host': 'example.com'} r = HTTPResponse(headers=headers) self.assertEqual(r.gethe...
'example.com')
17
8
urllib3/urllib3
train
46
f7eaa46ff1a96c5f0d209d8f2cedb48e759f522b
train
test/test_util.py
train
urllib3/urllib3:test/test_util.py
147
8
self.assertTrue
test_add_stderr_logger
import unittest import logging from urllib3 import add_stderr_logger from urllib3.util import get_host, make_headers, split_first, parse_url, Url from urllib3.exceptions import LocationParseError class TestUtil(unittest.TestCase): def test_get_host(self): url_host_map = { # Hosts ...
handler in logger.handlers)
added
3a63d53ee4cf277b224bd365c77d08b7bb97268e2989e765ec19f86c9a151f3f
self.assertTrue|test_add_stderr_logger|import unittest import logging from urllib3 import add_stderr_logger from urllib3.util import get_host, make_headers, split_first, parse_url, Url from urllib3.exceptions import LocationParseError class TestUtil(unittest.TestCase): def test_get_host(self): url_host_map = { # Hosts ...
null
null
null
urllib3/urllib3
train
46
f7eaa46ff1a96c5f0d209d8f2cedb48e759f522b
train
test/with_dummyserver/test_connectionpool.py
train
urllib3/urllib3:test/with_dummyserver/test_connectionpool.py
36
8
self.assertEqual
test_get
import logging import sys import unittest try: from urllib.parse import urlencode except: from urllib import urlencode from urllib3 import encode_multipart_formdata, HTTPConnectionPool from urllib3.exceptions import ( EmptyPoolError, DecodeError, MaxRetryError, TimeoutError, ) from urllib3.pac...
r.data)
added
78e3390ac6417ba480c53fef282667fc4aacdfe4c86d342629447e1af8a9c66d
self.assertEqual|test_get|import logging import sys import unittest try: from urllib.parse import urlencode except: from urllib import urlencode from urllib3 import encode_multipart_formdata, HTTPConnectionPool from urllib3.exceptions import ( EmptyPoolError, DecodeError, MaxRetryError, TimeoutError, ) from urllib3.pac...
null
null
null
urllib3/urllib3
train
46
f7eaa46ff1a96c5f0d209d8f2cedb48e759f522b
train
test/with_dummyserver/test_poolmanager.py
train
urllib3/urllib3:test/with_dummyserver/test_poolmanager.py
45
8
self.assertEqual
test_cross_host_redirect
import unittest from dummyserver.testcase import HTTPDummyServerTestCase from urllib3.poolmanager import PoolManager from urllib3.connectionpool import port_by_scheme from urllib3.exceptions import MaxRetryError class TestPoolManager(HTTPDummyServerTestCase): base_url = 'http://%s:%d' % (HTTPDummyServerTestCase....
self.host_alt)
modified
52531fa4479ab76cf2eea710fcccbb0ac9361144fd28fb61a9e008a72c73a7a3
self.assertEqual|test_cross_host_redirect|import unittest from dummyserver.testcase import HTTPDummyServerTestCase from urllib3.poolmanager import PoolManager from urllib3.connectionpool import port_by_scheme from urllib3.exceptions import MaxRetryError class TestPoolManager(HTTPDummyServerTestCase): base_url = 'http:/...
self.host_alt)
45
8
urllib3/urllib3
train
47
9061d14b7123c7afdc1081f133b826db6bbe203e
train
test/test_connectionpool.py
train
urllib3/urllib3:test/test_connectionpool.py
83
8
self.assertEqual
test_pool_edgecases
import unittest from urllib3.connectionpool import connection_from_url, HTTPConnectionPool from urllib3.packages.ssl_match_hostname import CertificateError from urllib3.exceptions import ( ClosedPoolError, EmptyPoolError, HostChangedError, MaxRetryError, SSLError, TimeoutError, ) from socket i...
pool._get_conn())
modified
e0f2959d8f6448b52e26678946d9bfcad93c311e1cd57416f9480edb6f031247
self.assertEqual|test_pool_edgecases|import unittest from urllib3.connectionpool import connection_from_url, HTTPConnectionPool from urllib3.packages.ssl_match_hostname import CertificateError from urllib3.exceptions import ( ClosedPoolError, EmptyPoolError, HostChangedError, MaxRetryError, SSLError, TimeoutError, ) fr...
3)
82
8
urllib3/urllib3
train
47
9061d14b7123c7afdc1081f133b826db6bbe203e
train
test/test_exceptions.py
val
urllib3/urllib3:test/test_exceptions.py
14
8
assert
test_exceptions
import unittest import pickle from urllib3.exceptions import HTTPError, MaxRetryError, LocationParseError from urllib3.connectionpool import HTTPConnectionPool class TestPickle(unittest.TestCase): def test_exceptions(self): assert pickle.dumps(HTTPError(None)) assert pickle.dumps(MaxRetryError(...
pickle.dumps(LocationParseError(None))
added
ae55d2ac82573e34cbb08c34a810ee18609765ffad51d3fe0a5c5ffe062ea5a4
assert|test_exceptions|import unittest import pickle from urllib3.exceptions import HTTPError, MaxRetryError, LocationParseError from urllib3.connectionpool import HTTPConnectionPool class TestPickle(unittest.TestCase): def test_exceptions(self): assert pickle.dumps(HTTPError(None)) assert pickle.dumps(MaxRetryError(No...
null
null
null
urllib3/urllib3
train
47
9061d14b7123c7afdc1081f133b826db6bbe203e
train
test/test_filepost.py
val
urllib3/urllib3:test/test_filepost.py
73
8
self.assertEqual
test_filename
import unittest from urllib3.filepost import encode_multipart_formdata, iter_fields from urllib3.packages.six import b, u BOUNDARY = '!! test boundary !!' class TestIterfields(unittest.TestCase): def test_dict(self): for fieldname, value in iter_fields(dict(a='b')): self.assertEqual((field...
b'--' + b(BOUNDARY) + b'\r\n' b'Content-Disposition: form-data; name="k"; filename="somename"\r\n' b'Content-Type: application/octet-stream\r\n' b'\r\n' b'v\r\n' b'--' + b(BOUNDARY) + b'--\r\n')
modified
1b72a4b7351b6e70fe64f728f4445acc23b89f98aac178ddc8e3127db8876e80
self.assertEqual|test_filename|import unittest from urllib3.filepost import encode_multipart_formdata, iter_fields from urllib3.packages.six import b, u BOUNDARY = '!! test boundary !!' class TestIterfields(unittest.TestCase): def test_dict(self): for fieldname, value in iter_fields(dict(a='b')): self.assertEqual((fiel...
b'--' + b(BOUNDARY) + b'\r\n' b'Content-Disposition: form-data; name="k"; filename="somename"\r\n' b'Content-Type: application/octet-stream\r\n' b'\r\n' b'v\r\n' b'--' + b(BOUNDARY) + b'--\r\n')
75
8
urllib3/urllib3
train
47
9061d14b7123c7afdc1081f133b826db6bbe203e
train
test/test_poolmanager.py
train
urllib3/urllib3:test/test_poolmanager.py
61
8
self.assertRaises
test_manager_clear
import unittest from urllib3.poolmanager import PoolManager from urllib3 import connection_from_url from urllib3.exceptions import ClosedPoolError class TestPoolManager(unittest.TestCase): def test_same_url(self): # Convince ourselves that normally we don't get the same object conn1 = connection_...
ClosedPoolError)
modified
f96f2f931eedc9fc2cdcecb26e550904b423286c2a613470ef04c51516dfe893
self.assertRaises|test_manager_clear|import unittest from urllib3.poolmanager import PoolManager from urllib3 import connection_from_url from urllib3.exceptions import ClosedPoolError class TestPoolManager(unittest.TestCase): def test_same_url(self): # Convince ourselves that normally we don't get the same object conn1...
ClosedPoolError)
62
13
urllib3/urllib3
train
47
9061d14b7123c7afdc1081f133b826db6bbe203e
train
test/with_dummyserver/test_connectionpool.py
train
urllib3/urllib3:test/with_dummyserver/test_connectionpool.py
207
8
self.assertEqual
test_post_with_urlencode
import logging import sys import unittest try: from urllib.parse import urlencode except: from urllib import urlencode from urllib3 import encode_multipart_formdata, HTTPConnectionPool from urllib3.exceptions import ( EmptyPoolError, DecodeError, MaxRetryError, TimeoutError, ) from urllib3.pac...
urlencode(data))
modified
23ba9c750f186c227f2fbeeb6eabef33273d170e7a295832ff8693f51fbdcfc7
self.assertEqual|test_post_with_urlencode|import logging import sys import unittest try: from urllib.parse import urlencode except: from urllib import urlencode from urllib3 import encode_multipart_formdata, HTTPConnectionPool from urllib3.exceptions import ( EmptyPoolError, DecodeError, MaxRetryError, TimeoutError, ) ...
urlencode(data))
208
8
urllib3/urllib3
train
47
9061d14b7123c7afdc1081f133b826db6bbe203e
train
test/with_dummyserver/test_https.py
train
urllib3/urllib3:test/with_dummyserver/test_https.py
47
12
self.assertTrue
test_verified
import logging import ssl import sys import unittest from dummyserver.testcase import HTTPSDummyServerTestCase from dummyserver.server import DEFAULT_CA, DEFAULT_CA_BAD, DEFAULT_CERTS from urllib3 import HTTPSConnectionPool from urllib3.connectionpool import VerifiedHTTPSConnection from urllib3.exceptions import SSLE...
'certificate verify failed' in str(e))
added
1502af9ecc3715be2379ab3597dad87d492b759fb928418e762fb4ce31f51d58
self.assertTrue|test_verified|import logging import ssl import sys import unittest from dummyserver.testcase import HTTPSDummyServerTestCase from dummyserver.server import DEFAULT_CA, DEFAULT_CA_BAD, DEFAULT_CERTS from urllib3 import HTTPSConnectionPool from urllib3.connectionpool import VerifiedHTTPSConnection from ur...
null
null
null
urllib3/urllib3
train
47
9061d14b7123c7afdc1081f133b826db6bbe203e
train
test/with_dummyserver/test_poolmanager.py
train
urllib3/urllib3:test/with_dummyserver/test_poolmanager.py
46
8
self.assertEqual
test_cross_host_redirect
import unittest import json from dummyserver.testcase import HTTPDummyServerTestCase from urllib3.poolmanager import PoolManager from urllib3.connectionpool import port_by_scheme from urllib3.exceptions import MaxRetryError class TestPoolManager(HTTPDummyServerTestCase): base_url = 'http://%s:%d' % (HTTPDummySer...
self.host_alt)
modified
5f53d6706e8e71edb473a586bdd953dec836abca8583792543d22175b2adc4d5
self.assertEqual|test_cross_host_redirect|import unittest import json from dummyserver.testcase import HTTPDummyServerTestCase from urllib3.poolmanager import PoolManager from urllib3.connectionpool import port_by_scheme from urllib3.exceptions import MaxRetryError class TestPoolManager(HTTPDummyServerTestCase): base_u...
self.host_alt)
45
8
urllib3/urllib3
train
47
9061d14b7123c7afdc1081f133b826db6bbe203e
train
test/with_dummyserver/test_socketlevel.py
train
urllib3/urllib3:test/with_dummyserver/test_socketlevel.py
149
8
self.assertEqual
test_simple
from urllib3 import HTTPConnectionPool, HTTPSConnectionPool from urllib3.poolmanager import proxy_from_url from urllib3.exceptions import MaxRetryError, TimeoutError, SSLError from urllib3 import util from dummyserver.testcase import SocketDummyServerTestCase from nose.plugins.skip import SkipTest from threading impo...
sorted([ b'GET http://google.com/ HTTP/1.1', b'Host: google.com', b'Accept-Encoding: identity', b'Accept: */*', b'', b'', ]))
added
b157c103b0a59b91589fb19e06b996b31df4c2c1792babc6825bc905ee427ef6
self.assertEqual|test_simple|from urllib3 import HTTPConnectionPool, HTTPSConnectionPool from urllib3.poolmanager import proxy_from_url from urllib3.exceptions import MaxRetryError, TimeoutError, SSLError from urllib3 import util from dummyserver.testcase import SocketDummyServerTestCase from nose.plugins.skip import S...
null
null
null
urllib3/urllib3
train
48
f4606453ef35b17e30a4f8a136d1d83d23b4059f
train
test/with_dummyserver/test_poolmanager.py
train
urllib3/urllib3:test/with_dummyserver/test_poolmanager.py
42
8
self.assertEqual
test_redirect_twice
import unittest import json from dummyserver.testcase import HTTPDummyServerTestCase from urllib3.poolmanager import PoolManager from urllib3.connectionpool import port_by_scheme from urllib3.exceptions import MaxRetryError class TestPoolManager(HTTPDummyServerTestCase): base_url = 'http://%s:%d' % (HTTPDummySer...
b'Dummy server!')
added
ab66f24dedb0958cafdfe4b5cdd7a7435d2604232d2a855c269a64706a771527
self.assertEqual|test_redirect_twice|import unittest import json from dummyserver.testcase import HTTPDummyServerTestCase from urllib3.poolmanager import PoolManager from urllib3.connectionpool import port_by_scheme from urllib3.exceptions import MaxRetryError class TestPoolManager(HTTPDummyServerTestCase): base_url = ...
null
null
null
urllib3/urllib3
train
48
f4606453ef35b17e30a4f8a136d1d83d23b4059f
train
test/with_dummyserver/test_poolmanager.py
train
urllib3/urllib3:test/with_dummyserver/test_poolmanager.py
61
8
self.assertEqual
test_cross_host_redirect
import unittest import json from dummyserver.testcase import HTTPDummyServerTestCase from urllib3.poolmanager import PoolManager from urllib3.connectionpool import port_by_scheme from urllib3.exceptions import MaxRetryError class TestPoolManager(HTTPDummyServerTestCase): base_url = 'http://%s:%d' % (HTTPDummySer...
self.host_alt)
added
6da91bc8f2ca5d34173f094361b5cb20e418f1006f5aa2c9ca0b850a1e812b0d
self.assertEqual|test_cross_host_redirect|import unittest import json from dummyserver.testcase import HTTPDummyServerTestCase from urllib3.poolmanager import PoolManager from urllib3.connectionpool import port_by_scheme from urllib3.exceptions import MaxRetryError class TestPoolManager(HTTPDummyServerTestCase): base_u...
null
null
null
urllib3/urllib3
train
48
f4606453ef35b17e30a4f8a136d1d83d23b4059f
train
test/with_dummyserver/test_poolmanager.py
train
urllib3/urllib3:test/with_dummyserver/test_poolmanager.py
79
8
self.assertEqual
test_missing_port
import unittest import json from dummyserver.testcase import HTTPDummyServerTestCase from urllib3.poolmanager import PoolManager from urllib3.connectionpool import port_by_scheme from urllib3.exceptions import MaxRetryError class TestPoolManager(HTTPDummyServerTestCase): base_url = 'http://%s:%d' % (HTTPDummySer...
b'Dummy server!')
added
dfd2d5b30a0c9cac05abf980c410289c52ad10e6b770368be3538819689c572e
self.assertEqual|test_missing_port|import unittest import json from dummyserver.testcase import HTTPDummyServerTestCase from urllib3.poolmanager import PoolManager from urllib3.connectionpool import port_by_scheme from urllib3.exceptions import MaxRetryError class TestPoolManager(HTTPDummyServerTestCase): base_url = 'h...
null
null
null
urllib3/urllib3
train
48
f4606453ef35b17e30a4f8a136d1d83d23b4059f
train
test/with_dummyserver/test_poolmanager.py
train
urllib3/urllib3:test/with_dummyserver/test_poolmanager.py
95
8
self.assertEqual
test_headers
import unittest import json from dummyserver.testcase import HTTPDummyServerTestCase from urllib3.poolmanager import PoolManager from urllib3.connectionpool import port_by_scheme from urllib3.exceptions import MaxRetryError class TestPoolManager(HTTPDummyServerTestCase): base_url = 'http://%s:%d' % (HTTPDummySer...
'quux')
added
280b34a15e0951d95ba39ef0f9011606235843b757aba8675891d313eecf50c4
self.assertEqual|test_headers|import unittest import json from dummyserver.testcase import HTTPDummyServerTestCase from urllib3.poolmanager import PoolManager from urllib3.connectionpool import port_by_scheme from urllib3.exceptions import MaxRetryError class TestPoolManager(HTTPDummyServerTestCase): base_url = 'http:/...
null
null
null
urllib3/urllib3
train
49
d50eb622812c942f996ae221a4ebfa25dd09241b
train
test/test_exceptions.py
val
urllib3/urllib3:test/test_exceptions.py
26
8
assert
test_exceptions_with_objects
import unittest import pickle from urllib3.exceptions import (HTTPError, MaxRetryError, LocationParseError, ClosedPoolError, EmptyPoolError, HostChangedError, TimeoutError) from urllib3.connectionpool import HTTPConnectionPool class TestPickle(unittest...
self.cycle(ClosedPoolError(HTTPConnectionPool('localhost'), None))
added
93b57bb7dc98ca5a5ca15bec80060ee8a934f21808edc6b06a954942e307b5d1
assert|test_exceptions_with_objects|import unittest import pickle from urllib3.exceptions import (HTTPError, MaxRetryError, LocationParseError, ClosedPoolError, EmptyPoolError, HostChangedError, TimeoutError) from urllib3.connectionpool import HTTPConnectionPool class TestPickle(unittest.TestCase): def cycle(self, item...
null
null
null
urllib3/urllib3
train
49
d50eb622812c942f996ae221a4ebfa25dd09241b
train
test/test_filepost.py
val
urllib3/urllib3:test/test_filepost.py
83
8
self.assertEqual
test_filename
import unittest 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(unittest.TestCase): def test_dict(self): for fieldname, value in iter_fields(dict(a='b...
'multipart/form-data; boundary=' + str(BOUNDARY))
modified
360e6901a51c3709c99c7291a04ae0a35aaf503caa05e9becd002bb804e1d557
self.assertEqual|test_filename|import unittest 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(unittest.TestCase): def test_dict(self): for fieldname, value in iter_fie...
'multipart/form-data; boundary=' + str(BOUNDARY))
82
8
urllib3/urllib3
train
49
d50eb622812c942f996ae221a4ebfa25dd09241b
train
test/test_proxymanager.py
val
urllib3/urllib3:test/test_proxymanager.py
24
8
self.assertEqual
test_proxy_headers
import unittest from urllib3.poolmanager import ProxyManager class TestProxyManager(unittest.TestCase): def test_proxy_headers(self): p = ProxyManager('http://something:1234') url = 'http://pypi.python.org/test' # Verify default headers default_headers = {'Accept': '*/*', ...
provided_headers)
modified
a58beff17c39eadb76d6445c255b55a0cf11c046673e4e247b5fab1450819a43
self.assertEqual|test_proxy_headers|import unittest from urllib3.poolmanager import ProxyManager class TestProxyManager(unittest.TestCase): def test_proxy_headers(self): p = ProxyManager('http://something:1234') url = 'http://pypi.python.org/test' # Verify default headers default_headers = {'Accept': '*/*', 'Host': 'py...
provided_headers)
24
8
urllib3/urllib3
train
49
d50eb622812c942f996ae221a4ebfa25dd09241b
train
test/test_response.py
train
urllib3/urllib3:test/test_response.py
39
8
self.assertEqual
test_preload
import unittest from io import BytesIO, BufferedReader from urllib3.response import HTTPResponse from urllib3.exceptions import DecodeError class TestLegacyResponse(unittest.TestCase): def test_getheaders(self): headers = {'host': 'example.com'} r = HTTPResponse(headers=headers) self.asse...
len(b'foo'))
modified
2aeb8762da277b5d8078f1b054be01abd2953c1d8f409ef57a292fdf3996f8dc
self.assertEqual|test_preload|import unittest from io import BytesIO, BufferedReader from urllib3.response import HTTPResponse from urllib3.exceptions import DecodeError class TestLegacyResponse(unittest.TestCase): def test_getheaders(self): headers = {'host': 'example.com'} r = HTTPResponse(headers=headers) self.asser...
len(b'foo'))
39
8
urllib3/urllib3
train
49
d50eb622812c942f996ae221a4ebfa25dd09241b
train
test/test_util.py
train
urllib3/urllib3:test/test_util.py
163
8
self.assertTrue
test_add_stderr_logger
import unittest import logging from urllib3 import add_stderr_logger from urllib3.util import get_host, make_headers, split_first, parse_url, Url from urllib3.exceptions import LocationParseError class TestUtil(unittest.TestCase): def test_get_host(self): url_host_map = { # Hosts ...
handler in logger.handlers)
added
c2def21b3874f13373baa046776d8292aba9a40dd98b4cf4d2fc47d8926e0aff
self.assertTrue|test_add_stderr_logger|import unittest import logging from urllib3 import add_stderr_logger from urllib3.util import get_host, make_headers, split_first, parse_url, Url from urllib3.exceptions import LocationParseError class TestUtil(unittest.TestCase): def test_get_host(self): url_host_map = { # Hosts ...
null
null
null
urllib3/urllib3
train
49
d50eb622812c942f996ae221a4ebfa25dd09241b
train
test/with_dummyserver/test_https.py
train
urllib3/urllib3:test/with_dummyserver/test_https.py
186
8
self.assertRaises
test_ssl_version_as_string
import logging import ssl import sys import unittest from dummyserver.testcase import HTTPSDummyServerTestCase from dummyserver.server import DEFAULT_CA, DEFAULT_CA_BAD, DEFAULT_CERTS from urllib3 import HTTPSConnectionPool from urllib3.connectionpool import VerifiedHTTPSConnection from urllib3.exceptions import SSLE...
SSLError)
added
633b467e38d43bc0b6934bbfe7df5196a83b21318495f26f72c719617de1f3ae
self.assertRaises|test_ssl_version_as_string|import logging import ssl import sys import unittest from dummyserver.testcase import HTTPSDummyServerTestCase from dummyserver.server import DEFAULT_CA, DEFAULT_CA_BAD, DEFAULT_CERTS from urllib3 import HTTPSConnectionPool from urllib3.connectionpool import VerifiedHTTPSCon...
null
null
null
urllib3/urllib3
train
49
d50eb622812c942f996ae221a4ebfa25dd09241b
train
test/with_dummyserver/test_poolmanager.py
train
urllib3/urllib3:test/with_dummyserver/test_poolmanager.py
30
8
self.assertEqual
test_redirect
import unittest import json from dummyserver.testcase import (HTTPDummyServerTestCase, IPv6HTTPDummyServerTestCase) from urllib3.poolmanager import PoolManager from urllib3.connectionpool import port_by_scheme from urllib3.exceptions import MaxRetryError class TestPoolManager(HTTPDu...
b'Dummy server!')
added
af1ee29c4f52589ef0efa0f9516eb6a83d51cfe40f24c57078f6f207a17603b1
self.assertEqual|test_redirect|import unittest import json from dummyserver.testcase import (HTTPDummyServerTestCase, IPv6HTTPDummyServerTestCase) from urllib3.poolmanager import PoolManager from urllib3.connectionpool import port_by_scheme from urllib3.exceptions import MaxRetryError class TestPoolManager(HTTPDummySer...
null
null
null
urllib3/urllib3
train
49
d50eb622812c942f996ae221a4ebfa25dd09241b
train
test/with_dummyserver/test_proxy_poolmanager.py
train
urllib3/urllib3:test/with_dummyserver/test_proxy_poolmanager.py
100
8
self.assertEqual
test_redirect
import unittest import json import socket from dummyserver.testcase import HTTPDummyProxyTestCase from dummyserver.server import DEFAULT_CA, DEFAULT_CA_BAD from urllib3.poolmanager import proxy_from_url, ProxyManager from urllib3.exceptions import MaxRetryError, SSLError, ProxyError from urllib3.connectionpool import...
b'Dummy server!')
added
2a61821b0a7b46d2db287fb34f7a62e6f526f6659ce082236a3f48e10c828876
self.assertEqual|test_redirect|import unittest import json import socket from dummyserver.testcase import HTTPDummyProxyTestCase from dummyserver.server import DEFAULT_CA, DEFAULT_CA_BAD from urllib3.poolmanager import proxy_from_url, ProxyManager from urllib3.exceptions import MaxRetryError, SSLError, ProxyError from ...
null
null
null
urllib3/urllib3
train
50
283cd99ca2a0cb0e6cfa1f9670d3fa2a88a66de9
train
test/test_connectionpool.py
train
urllib3/urllib3:test/test_connectionpool.py
127
12
self.assertRaises
_test
import unittest from urllib3.connectionpool import ( connection_from_url, HTTPConnection, HTTPConnectionPool, ) from urllib3.util import Timeout from urllib3.packages.ssl_match_hostname import CertificateError from urllib3.exceptions import ( ClosedPoolError, EmptyPoolError, HostChangedError, ...
expect)
added
72a4d1aa5465be27673a14254e85aef1519602e714ea5880aa0c6c664bebe9b9
self.assertRaises|_test|import unittest from urllib3.connectionpool import ( connection_from_url, HTTPConnection, HTTPConnectionPool, ) from urllib3.util import Timeout from urllib3.packages.ssl_match_hostname import CertificateError from urllib3.exceptions import ( ClosedPoolError, EmptyPoolError, HostChangedError, Ma...
null
null
null
urllib3/urllib3
train
50
283cd99ca2a0cb0e6cfa1f9670d3fa2a88a66de9
train
test/test_exceptions.py
val
urllib3/urllib3:test/test_exceptions.py
25
8
assert
test_exceptions_with_objects
import unittest import pickle from urllib3.exceptions import (HTTPError, MaxRetryError, LocationParseError, ClosedPoolError, EmptyPoolError, HostChangedError, ReadTimeoutError, ConnectTimeoutError) from urllib3.connectionpo...
self.cycle(MaxRetryError(HTTPConnectionPool('localhost'), '/', None))
modified
05987a060f8f129735267e1d6a2e6a33afee25816e76aa977187cb9ffa499048
assert|test_exceptions_with_objects|import unittest import pickle from urllib3.exceptions import (HTTPError, MaxRetryError, LocationParseError, ClosedPoolError, EmptyPoolError, HostChangedError, ReadTimeoutError, ConnectTimeoutError) from urllib3.connectionpool import HTTPConnectionPool class TestPickle(unittest.TestCa...
self.cycle(MaxRetryError(HTTPConnectionPool('localhost'), '/', None))
23
8
urllib3/urllib3
train
50
283cd99ca2a0cb0e6cfa1f9670d3fa2a88a66de9
train
test/test_util.py
train
urllib3/urllib3:test/test_util.py
171
12
self.assertEqual
test_split_first
import logging import unittest from mock import patch from urllib3 import add_stderr_logger from urllib3.util import ( get_host, make_headers, split_first, parse_url, Timeout, Url, ) from urllib3.exceptions import LocationParseError, TimeoutStateError # This number represents a time in second...
expected)
added
0d04af44abecc953e28d4a27607eb20374d3df408c4b6eec4bcf08812dfb507f
self.assertEqual|test_split_first|import logging import unittest from mock import patch from urllib3 import add_stderr_logger from urllib3.util import ( get_host, make_headers, split_first, parse_url, Timeout, Url, ) from urllib3.exceptions import LocationParseError, TimeoutStateError # This number represents a time in...
null
null
null