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 | 179 | 29491230603c7b55fc4fc8a3fbfcbbd179b7a8b6 | train | test/test_connectionpool.py | train | urllib3/urllib3:test/test_connectionpool.py | 283 | 8 | self.assertEqual | test_absolute_url | from __future__ import absolute_import
import unittest
from urllib3.connectionpool import (
connection_from_url,
HTTPConnection,
HTTPConnectionPool,
HTTPSConnectionPool,
)
from urllib3.response import httplib, HTTPResponse
from urllib3.util.timeout import Timeout
from urllib3.packages.ssl_match_hostna... | c._absolute_url('path?query=foo')) | modified | a6939eea6cc57f061d7525665abe38d916504467a74ea39d64f81a556a604bc9 | self.assertEqual|test_absolute_url|from __future__ import absolute_import import unittest from urllib3.connectionpool import ( connection_from_url, HTTPConnection, HTTPConnectionPool, HTTPSConnectionPool, ) from urllib3.response import httplib, HTTPResponse from urllib3.util.timeout import Timeout from urllib3.packages... | c._absolute_url('path?query=foo')) | 283 | 8 |
urllib3/urllib3 | train | 179 | 29491230603c7b55fc4fc8a3fbfcbbd179b7a8b6 | train | test/test_connectionpool.py | train | urllib3/urllib3:test/test_connectionpool.py | 316 | 8 | self.assertEqual | test_cleanup_on_extreme_connection_error | from __future__ import absolute_import
import unittest
from urllib3.connectionpool import (
connection_from_url,
HTTPConnection,
HTTPConnectionPool,
HTTPSConnectionPool,
)
from urllib3.response import httplib, HTTPResponse
from urllib3.util.timeout import Timeout
from urllib3.packages.ssl_match_hostna... | new_pool_size) | modified | 52cdafa002c8287494bdbf1a96f2ba1b01dce76d82c9fa1a0c96bab789f8d6a5 | self.assertEqual|test_cleanup_on_extreme_connection_error|from __future__ import absolute_import import unittest from urllib3.connectionpool import ( connection_from_url, HTTPConnection, HTTPConnectionPool, HTTPSConnectionPool, ) from urllib3.response import httplib, HTTPResponse from urllib3.util.timeout import Timeou... | new_pool_size) | 316 | 8 |
urllib3/urllib3 | train | 180 | 00994dbf8663b353e1e404066f1b9df161ef65cb | train | test/test_connectionpool.py | train | urllib3/urllib3:test/test_connectionpool.py | 169 | 8 | self.assertEqual | test_exception_str | from __future__ import absolute_import
import unittest
from urllib3.connectionpool import (
connection_from_url,
HTTPConnection,
HTTPConnectionPool,
HTTPSConnectionPool,
)
from urllib3.response import httplib, HTTPResponse
from urllib3.util.timeout import Timeout
from urllib3.packages.ssl_match_hostna... | "HTTPConnectionPool(host='localhost', port=None): Test.") | modified | 428315d91fdd8453b8655ee741b136769a709c8babfd3a4a0ec99eceb8a30ae7 | self.assertEqual|test_exception_str|from __future__ import absolute_import import unittest from urllib3.connectionpool import ( connection_from_url, HTTPConnection, HTTPConnectionPool, HTTPSConnectionPool, ) from urllib3.response import httplib, HTTPResponse from urllib3.util.timeout import Timeout from urllib3.package... | "HTTPConnectionPool(host='localhost', port=None): Test.") | 167 | 8 |
urllib3/urllib3 | train | 180 | 00994dbf8663b353e1e404066f1b9df161ef65cb | train | test/test_connectionpool.py | train | urllib3/urllib3:test/test_connectionpool.py | 285 | 8 | self.assertEqual | test_absolute_url | from __future__ import absolute_import
import unittest
from urllib3.connectionpool import (
connection_from_url,
HTTPConnection,
HTTPConnectionPool,
HTTPSConnectionPool,
)
from urllib3.response import httplib, HTTPResponse
from urllib3.util.timeout import Timeout
from urllib3.packages.ssl_match_hostna... | c._absolute_url('path?query=foo')) | added | 10e14f9208e946cbc02bcc508136db428e28b1ec2330db34373a9fae25b6e1b1 | self.assertEqual|test_absolute_url|from __future__ import absolute_import import unittest from urllib3.connectionpool import ( connection_from_url, HTTPConnection, HTTPConnectionPool, HTTPSConnectionPool, ) from urllib3.response import httplib, HTTPResponse from urllib3.util.timeout import Timeout from urllib3.packages... | null | null | null |
urllib3/urllib3 | train | 180 | 00994dbf8663b353e1e404066f1b9df161ef65cb | train | test/test_connectionpool.py | train | urllib3/urllib3:test/test_connectionpool.py | 390 | 8 | self.assertTrue | test_custom_http_response_class | from __future__ import absolute_import
import unittest
from urllib3.connectionpool import (
connection_from_url,
HTTPConnection,
HTTPConnectionPool,
HTTPSConnectionPool,
)
from urllib3.response import httplib, HTTPResponse
from urllib3.util.timeout import Timeout
from urllib3.packages.ssl_match_hostna... | isinstance(response, CustomHTTPResponse)) | added | be56869b964ef5d8c3d04f4d72becfa2c860939c5b28c8b27daf879a101fbe41 | self.assertTrue|test_custom_http_response_class|from __future__ import absolute_import import unittest from urllib3.connectionpool import ( connection_from_url, HTTPConnection, HTTPConnectionPool, HTTPSConnectionPool, ) from urllib3.response import httplib, HTTPResponse from urllib3.util.timeout import Timeout from url... | null | null | null |
urllib3/urllib3 | train | 180 | 00994dbf8663b353e1e404066f1b9df161ef65cb | train | test/test_util.py | train | urllib3/urllib3:test/test_util.py | 402 | 8 | assert_* | test_ssl_wrap_socket_creates_new_context | import hashlib
import warnings
import logging
import unittest
import ssl
import socket
from itertools import chain
from mock import patch, Mock
from urllib3 import add_stderr_logger, disable_warnings
from urllib3.util.request import make_headers
from urllib3.util.timeout import Timeout
from urllib3.util.url import (
... | 'CERT_REQUIRED') | added | 1d00fe1b2cdca176bfdba1925833afa8f28ab24620c22ae19f9f88884dcd4bc7 | assert_*|test_ssl_wrap_socket_creates_new_context|import hashlib import warnings import logging import unittest import ssl import socket from itertools import chain from mock import patch, Mock from urllib3 import add_stderr_logger, disable_warnings from urllib3.util.request import make_headers from urllib3.util.timeou... | null | null | null |
urllib3/urllib3 | train | 180 | 00994dbf8663b353e1e404066f1b9df161ef65cb | train | test/test_util.py | train | urllib3/urllib3:test/test_util.py | 419 | 8 | assert_* | test_ssl_wrap_socket_loads_certificate_directories | import hashlib
import warnings
import logging
import unittest
import ssl
import socket
from itertools import chain
from mock import patch, Mock
from urllib3 import add_stderr_logger, disable_warnings
from urllib3.util.request import make_headers
from urllib3.util.timeout import Timeout
from urllib3.util.url import (
... | '/path/to/pems') | added | 814c80ea3959eae59e14cf9f48ec0234a50ec6df13c3e39f03e316f623d9a721 | assert_*|test_ssl_wrap_socket_loads_certificate_directories|import hashlib import warnings import logging import unittest import ssl import socket from itertools import chain from mock import patch, Mock from urllib3 import add_stderr_logger, disable_warnings from urllib3.util.request import make_headers from urllib3.u... | null | null | null |
urllib3/urllib3 | train | 180 | 00994dbf8663b353e1e404066f1b9df161ef65cb | train | test/with_dummyserver/test_https.py | train | urllib3/urllib3:test/with_dummyserver/test_https.py | 174 | 12 | self.assertTrue | test_invalid_common_name | import datetime
import logging
import ssl
import sys
import unittest
import warnings
import mock
from nose.plugins.skip import SkipTest
from dummyserver.testcase import (
HTTPSDummyServerTestCase, IPV6HTTPSDummyServerTestCase
)
from dummyserver.server import (DEFAULT_CA, DEFAULT_CA_BAD, DEFAULT_CERTS,
... | "doesn't match" in str(e)) | added | a4ebb2d00f63304d51b603c6612063ec0b110c69aca57cfc43078a4ae4941a75 | self.assertTrue|test_invalid_common_name|import datetime import logging import ssl import sys import unittest import warnings import mock from nose.plugins.skip import SkipTest from dummyserver.testcase import ( HTTPSDummyServerTestCase, IPV6HTTPSDummyServerTestCase ) from dummyserver.server import (DEFAULT_CA, DEFAULT... | null | null | null |
urllib3/urllib3 | train | 180 | 00994dbf8663b353e1e404066f1b9df161ef65cb | train | test/with_dummyserver/test_https.py | train | urllib3/urllib3:test/with_dummyserver/test_https.py | 185 | 12 | self.assertTrue | test_verified_with_bad_ca_certs | import datetime
import logging
import ssl
import sys
import unittest
import warnings
import mock
from nose.plugins.skip import SkipTest
from dummyserver.testcase import (
HTTPSDummyServerTestCase, IPV6HTTPSDummyServerTestCase
)
from dummyserver.server import (DEFAULT_CA, DEFAULT_CA_BAD, DEFAULT_CERTS,
... | 'certificate verify failed' in str(e)) | added | f481bfa9852e0490a35eab6519c3a57f301407cbee7af2dd435142ca15de1c97 | self.assertTrue|test_verified_with_bad_ca_certs|import datetime import logging import ssl import sys import unittest import warnings import mock from nose.plugins.skip import SkipTest from dummyserver.testcase import ( HTTPSDummyServerTestCase, IPV6HTTPSDummyServerTestCase ) from dummyserver.server import (DEFAULT_CA, ... | null | null | null |
urllib3/urllib3 | train | 180 | 00994dbf8663b353e1e404066f1b9df161ef65cb | train | test/with_dummyserver/test_https.py | train | urllib3/urllib3:test/with_dummyserver/test_https.py | 486 | 8 | self.assertRaises | test_discards_connection_on_sslerror | import datetime
import logging
import ssl
import sys
import unittest
import warnings
import mock
from nose.plugins.skip import SkipTest
from dummyserver.testcase import (
HTTPSDummyServerTestCase, IPV6HTTPSDummyServerTestCase
)
from dummyserver.server import (DEFAULT_CA, DEFAULT_CA_BAD, DEFAULT_CERTS,
... | SSLError) | added | f474881db6015bfd34aff49f3ad03998cfaebdee8af07919fb9cc6ce29c7ed47 | self.assertRaises|test_discards_connection_on_sslerror|import datetime import logging import ssl import sys import unittest import warnings import mock from nose.plugins.skip import SkipTest from dummyserver.testcase import ( HTTPSDummyServerTestCase, IPV6HTTPSDummyServerTestCase ) from dummyserver.server import (DEFAU... | null | null | null |
urllib3/urllib3 | train | 181 | 01ef7dfb022ef74fee1451413ccb4d29f398cf76 | train | test/test_util.py | train | urllib3/urllib3:test/test_util.py | 203 | 12 | self.assertEqual | test_request_uri | import hashlib
import warnings
import logging
import unittest
import ssl
import socket
from itertools import chain
from mock import patch, Mock
from urllib3 import add_stderr_logger, disable_warnings
from urllib3.util.request import make_headers
from urllib3.util.timeout import Timeout
from urllib3.util.url import (
... | expected_request_uri) | added | c8f107ccce4cf35dff97a93ef299282845b88db3246c731c6d0ea8db41ed9c8c | self.assertEqual|test_request_uri|import hashlib import warnings import logging import unittest import ssl import socket from itertools import chain from mock import patch, Mock from urllib3 import add_stderr_logger, disable_warnings from urllib3.util.request import make_headers from urllib3.util.timeout import Timeout... | null | null | null |
urllib3/urllib3 | train | 181 | 01ef7dfb022ef74fee1451413ccb4d29f398cf76 | train | test/test_util.py | train | urllib3/urllib3:test/test_util.py | 332 | 8 | self.assertEqual | test_timeout | import hashlib
import warnings
import logging
import unittest
import ssl
import socket
from itertools import chain
from mock import patch, Mock
from urllib3 import add_stderr_logger, disable_warnings
from urllib3.util.request import make_headers
from urllib3.util.timeout import Timeout
from urllib3.util.url import (
... | Timeout.DEFAULT_TIMEOUT) | added | 86c72687048de0fef701c4df038c3b627ae80692c29b3475e530d0fec653d386 | self.assertEqual|test_timeout|import hashlib import warnings import logging import unittest import ssl import socket from itertools import chain from mock import patch, Mock from urllib3 import add_stderr_logger, disable_warnings from urllib3.util.request import make_headers from urllib3.util.timeout import Timeout fro... | null | null | null |
urllib3/urllib3 | train | 181 | 01ef7dfb022ef74fee1451413ccb4d29f398cf76 | train | test/test_util.py | train | urllib3/urllib3:test/test_util.py | 372 | 8 | self.assertRaises | test_timeout_elapsed | import hashlib
import warnings
import logging
import unittest
import ssl
import socket
from itertools import chain
from mock import patch, Mock
from urllib3 import add_stderr_logger, disable_warnings
from urllib3.util.request import make_headers
from urllib3.util.timeout import Timeout
from urllib3.util.url import (
... | TimeoutStateError) | added | a073318cc258daa70ce18f7550400f59a8b96851bec20870e73d6a058c4475ee | self.assertRaises|test_timeout_elapsed|import hashlib import warnings import logging import unittest import ssl import socket from itertools import chain from mock import patch, Mock from urllib3 import add_stderr_logger, disable_warnings from urllib3.util.request import make_headers from urllib3.util.timeout import Ti... | null | null | null |
urllib3/urllib3 | train | 181 | 01ef7dfb022ef74fee1451413ccb4d29f398cf76 | train | test/test_util.py | train | urllib3/urllib3:test/test_util.py | 400 | 8 | self.assertTrue | test_is_fp_closed_object_has_none_fp | import hashlib
import warnings
import logging
import unittest
import ssl
import socket
from itertools import chain
from mock import patch, Mock
from urllib3 import add_stderr_logger, disable_warnings
from urllib3.util.request import make_headers
from urllib3.util.timeout import Timeout
from urllib3.util.url import (
... | is_fp_closed(NoneFpFile())) | added | dfe22d2520a02116d8f7e621ef1b77257c3e80ba066e18db3db8793bde8d0c53 | self.assertTrue|test_is_fp_closed_object_has_none_fp|import hashlib import warnings import logging import unittest import ssl import socket from itertools import chain from mock import patch, Mock from urllib3 import add_stderr_logger, disable_warnings from urllib3.util.request import make_headers from urllib3.util.tim... | null | null | null |
urllib3/urllib3 | train | 182 | ecb7ab63b2c8fae04b53c2114e1b674ba25f5d4c | train | test/contrib/test_gae_manager.py | train | urllib3/urllib3:test/contrib/test_gae_manager.py | 71 | 8 | self.assertRaises | test_exceptions | import unittest
from dummyserver.testcase import HTTPSDummyServerTestCase
from nose.plugins.skip import SkipTest
try:
from google.appengine.api import urlfetch
(urlfetch)
except ImportError:
raise SkipTest("App Engine SDK not available.")
from urllib3.contrib.appengine import AppEngineManager, AppEngineP... | TimeoutError) | modified | 7656efb9db0ae325f860aabb49e188dbca08f85a354e2fc729646e2c40152072 | self.assertRaises|test_exceptions|import unittest from dummyserver.testcase import HTTPSDummyServerTestCase from nose.plugins.skip import SkipTest try: from google.appengine.api import urlfetch (urlfetch) except ImportError: raise SkipTest("App Engine SDK not available.") from urllib3.contrib.appengine import AppEngine... | TimeoutError) | 71 | 8 |
urllib3/urllib3 | train | 182 | ecb7ab63b2c8fae04b53c2114e1b674ba25f5d4c | train | test/contrib/test_gae_manager.py | train | urllib3/urllib3:test/contrib/test_gae_manager.py | 79 | 8 | self.assertRaises | test_exceptions | import unittest
from dummyserver.testcase import HTTPSDummyServerTestCase
from nose.plugins.skip import SkipTest
try:
from google.appengine.api import urlfetch
(urlfetch)
except ImportError:
raise SkipTest("App Engine SDK not available.")
from urllib3.contrib.appengine import AppEngineManager, AppEngineP... | ProtocolError) | modified | 90d21585ee7ca26bc448304aa2064ebca10dad0dcbc2a839272ccf3d86f3196f | self.assertRaises|test_exceptions|import unittest from dummyserver.testcase import HTTPSDummyServerTestCase from nose.plugins.skip import SkipTest try: from google.appengine.api import urlfetch (urlfetch) except ImportError: raise SkipTest("App Engine SDK not available.") from urllib3.contrib.appengine import AppEngine... | ProtocolError) | 79 | 8 |
urllib3/urllib3 | train | 182 | ecb7ab63b2c8fae04b53c2114e1b674ba25f5d4c | train | test/test_response.py | train | urllib3/urllib3:test/test_response.py | 160 | 8 | self.assertTrue | test_body_blob | import unittest
from io import BytesIO, BufferedReader
try:
import http.client as httplib
except ImportError:
import httplib
from urllib3.response import HTTPResponse
from urllib3.exceptions import DecodeError, ResponseNotChunked, ProtocolError
from urllib3.util.retry import Retry
from base64 import b64deco... | resp.closed) | modified | 75fb9a1648530070b052da7d056a1321ea25abb52231be7ddb60e4f3e00d66df | self.assertTrue|test_body_blob|import unittest from io import BytesIO, BufferedReader try: import http.client as httplib except ImportError: import httplib from urllib3.response import HTTPResponse from urllib3.exceptions import DecodeError, ResponseNotChunked, ProtocolError from urllib3.util.retry import Retry from ba... | resp.closed) | 159 | 8 |
urllib3/urllib3 | train | 182 | ecb7ab63b2c8fae04b53c2114e1b674ba25f5d4c | train | test/test_response.py | train | urllib3/urllib3:test/test_response.py | 199 | 8 | self.assertEqual | test_io_bufferedreader | import unittest
from io import BytesIO, BufferedReader
try:
import http.client as httplib
except ImportError:
import httplib
from urllib3.response import HTTPResponse
from urllib3.exceptions import DecodeError, ResponseNotChunked, ProtocolError
from urllib3.util.retry import Retry
from base64 import b64deco... | b'foo') | modified | 53f69c2ecbd36fdbe80e4e2c64d50c4dbe3a2599644a3e6a627c7f5f740e5620 | self.assertEqual|test_io_bufferedreader|import unittest from io import BytesIO, BufferedReader try: import http.client as httplib except ImportError: import httplib from urllib3.response import HTTPResponse from urllib3.exceptions import DecodeError, ResponseNotChunked, ProtocolError from urllib3.util.retry import Retr... | b'foo') | 198 | 8 |
urllib3/urllib3 | train | 182 | ecb7ab63b2c8fae04b53c2114e1b674ba25f5d4c | train | test/test_retry.py | train | urllib3/urllib3:test/test_retry.py | 82 | 8 | self.assertRaises | test_retry_default | import unittest
from urllib3.response import HTTPResponse
from urllib3.packages.six.moves import xrange
from urllib3.util.retry import Retry, RequestHistory
from urllib3.exceptions import (
ConnectTimeoutError,
MaxRetryError,
ReadTimeoutError,
ResponseError,
)
class RetryTest(unittest.TestCase):
... | MaxRetryError) | modified | 9183b81dc45b7a7dd6e27e881fe1ca677a10341c6090b40badf2a74615c4e500 | self.assertRaises|test_retry_default|import unittest from urllib3.response import HTTPResponse from urllib3.packages.six.moves import xrange from urllib3.util.retry import Retry, RequestHistory from urllib3.exceptions import ( ConnectTimeoutError, MaxRetryError, ReadTimeoutError, ResponseError, ) class RetryTest(unitte... | MaxRetryError) | 82 | 8 |
urllib3/urllib3 | train | 182 | ecb7ab63b2c8fae04b53c2114e1b674ba25f5d4c | train | test/test_retry.py | train | urllib3/urllib3:test/test_retry.py | 239 | 8 | self.assertEqual | test_history | import unittest
from urllib3.response import HTTPResponse
from urllib3.packages.six.moves import xrange
from urllib3.util.retry import Retry, RequestHistory
from urllib3.exceptions import (
ConnectTimeoutError,
MaxRetryError,
ReadTimeoutError,
ResponseError,
)
class RetryTest(unittest.TestCase):
... | (RequestHistory('GET', '/test1', connection_error, None, None), RequestHistory('POST', '/test2', read_error, None, None), RequestHistory('GET', '/test3', None, 500, None))) | added | fbaeecc107eb711a40a7fa1e948c4d73bfff7d4b73c1014cc46197bf5ef7c17b | self.assertEqual|test_history|import unittest from urllib3.response import HTTPResponse from urllib3.packages.six.moves import xrange from urllib3.util.retry import Retry, RequestHistory from urllib3.exceptions import ( ConnectTimeoutError, MaxRetryError, ReadTimeoutError, ResponseError, ) class RetryTest(unittest.Test... | null | null | null |
urllib3/urllib3 | train | 182 | ecb7ab63b2c8fae04b53c2114e1b674ba25f5d4c | train | test/with_dummyserver/test_connectionpool.py | train | urllib3/urllib3:test/with_dummyserver/test_connectionpool.py | 179 | 8 | self.assertRaises | test_total_applies_connect | import errno
import logging
import socket
import sys
import unittest
import time
import warnings
import mock
try:
from urllib.parse import urlencode
except:
from urllib import urlencode
from .. import (
requires_network, onlyPy3, onlyPy26OrOlder,
TARPIT_HOST, VALID_SOURCE_ADDRESSES, INVALID_SOURCE_AD... | ConnectTimeoutError) | modified | afcd5da19b0f7146821f8bab5db513898e9a88b8c7a35cfaa21843ba3374fe6e | self.assertRaises|test_total_applies_connect|import errno import logging import socket import sys import unittest import time import warnings import mock try: from urllib.parse import urlencode except: from urllib import urlencode from .. import ( requires_network, onlyPy3, onlyPy26OrOlder, TARPIT_HOST, VALID_SOURCE_AD... | ConnectTimeoutError) | 179 | 8 |
urllib3/urllib3 | train | 182 | ecb7ab63b2c8fae04b53c2114e1b674ba25f5d4c | train | test/with_dummyserver/test_connectionpool.py | train | urllib3/urllib3:test/with_dummyserver/test_connectionpool.py | 305 | 8 | self.assertTrue | test_socket_options | import errno
import logging
import socket
import sys
import unittest
import time
import warnings
import mock
try:
from urllib.parse import urlencode
except:
from urllib import urlencode
from .. import (
requires_network, onlyPy3, onlyPy26OrOlder,
TARPIT_HOST, VALID_SOURCE_ADDRESSES, INVALID_SOURCE_AD... | using_keepalive) | modified | 49f16447050216722bfdfe07c6535f30129e5fcc4363f69a5e5b5ab833735e0b | self.assertTrue|test_socket_options|import errno import logging import socket import sys import unittest import time import warnings import mock try: from urllib.parse import urlencode except: from urllib import urlencode from .. import ( requires_network, onlyPy3, onlyPy26OrOlder, TARPIT_HOST, VALID_SOURCE_ADDRESSES, ... | using_keepalive) | 305 | 8 |
urllib3/urllib3 | train | 183 | b864ad47edf1daa53d441d81de64c755948a915f | train | test/test_util.py | train | urllib3/urllib3:test/test_util.py | 329 | 12 | self.assertTrue | test_invalid_timeouts | import hashlib
import warnings
import logging
import unittest
import ssl
import socket
from itertools import chain
from mock import patch, Mock
from urllib3 import add_stderr_logger, disable_warnings
from urllib3.util.request import make_headers
from urllib3.util.timeout import Timeout
from urllib3.util.url import (
... | 'int, float or None' in str(e)) | added | e9906f86080c628621e783851c369d9f310047a3a521e080a5c1349d4120a457 | self.assertTrue|test_invalid_timeouts|import hashlib import warnings import logging import unittest import ssl import socket from itertools import chain from mock import patch, Mock from urllib3 import add_stderr_logger, disable_warnings from urllib3.util.request import make_headers from urllib3.util.timeout import Tim... | null | null | null |
urllib3/urllib3 | train | 183 | b864ad47edf1daa53d441d81de64c755948a915f | train | test/test_util.py | train | urllib3/urllib3:test/test_util.py | 406 | 8 | self.assertTrue | test_is_fp_closed_object_supports_closed | import hashlib
import warnings
import logging
import unittest
import ssl
import socket
from itertools import chain
from mock import patch, Mock
from urllib3 import add_stderr_logger, disable_warnings
from urllib3.util.request import make_headers
from urllib3.util.timeout import Timeout
from urllib3.util.url import (
... | is_fp_closed(ClosedFile())) | added | 3e57b707cab120ac9610d7827df346e48606a4c3d0dc58635533a0f0052abfc6 | self.assertTrue|test_is_fp_closed_object_supports_closed|import hashlib import warnings import logging import unittest import ssl import socket from itertools import chain from mock import patch, Mock from urllib3 import add_stderr_logger, disable_warnings from urllib3.util.request import make_headers from urllib3.util... | null | null | null |
urllib3/urllib3 | train | 183 | b864ad47edf1daa53d441d81de64c755948a915f | train | test/test_util.py | train | urllib3/urllib3:test/test_util.py | 518 | 16 | self.assertTrue | test_has_ipv6_enabled_and_working | import hashlib
import warnings
import logging
import unittest
import ssl
import socket
from itertools import chain
from mock import patch, Mock
from urllib3 import add_stderr_logger, disable_warnings
from urllib3.util.request import make_headers
from urllib3.util.timeout import Timeout
from urllib3.util.url import (
... | _has_ipv6('::1')) | added | b0231c779e205f87f361bedf399736b576eb502e28b8afb71d0ad79dce73e82d | self.assertTrue|test_has_ipv6_enabled_and_working|import hashlib import warnings import logging import unittest import ssl import socket from itertools import chain from mock import patch, Mock from urllib3 import add_stderr_logger, disable_warnings from urllib3.util.request import make_headers from urllib3.util.timeou... | null | null | null |
urllib3/urllib3 | train | 183 | b864ad47edf1daa53d441d81de64c755948a915f | train | test/test_util.py | train | urllib3/urllib3:test/test_util.py | 522 | 12 | self.assertEqual | test_ip_family_ipv6_enabled | import hashlib
import warnings
import logging
import unittest
import ssl
import socket
from itertools import chain
from mock import patch, Mock
from urllib3 import add_stderr_logger, disable_warnings
from urllib3.util.request import make_headers
from urllib3.util.timeout import Timeout
from urllib3.util.url import (
... | socket.AF_UNSPEC) | added | 763ecf450f6d50aba6da88b24e0de5bd6a469c351b9d8e2a06e68794d4fa6b27 | self.assertEqual|test_ip_family_ipv6_enabled|import hashlib import warnings import logging import unittest import ssl import socket from itertools import chain from mock import patch, Mock from urllib3 import add_stderr_logger, disable_warnings from urllib3.util.request import make_headers from urllib3.util.timeout imp... | null | null | null |
urllib3/urllib3 | train | 184 | defda2a37df110da33ecb9df902bcbe907cc881d | train | test/with_dummyserver/test_socketlevel.py | train | urllib3/urllib3:test/with_dummyserver/test_socketlevel.py | 1,076 | 8 | self.assertEqual | test_stream_none_unchunked_response_does_not_hang | # TODO: Break this module up into pieces. Maybe group by functionality tested
# rather than the socket level-ness of it.
from urllib3 import HTTPConnectionPool, HTTPSConnectionPool
from urllib3.poolmanager import proxy_from_url
from urllib3.exceptions import (
MaxRetryError,
ProxyError,
Connect... | list(r.stream(None))) | added | 80e56c493df6b4a6f427d45076d4d46f12747ac9be262bb7f942afdaa1d1e8f2 | self.assertEqual|test_stream_none_unchunked_response_does_not_hang|# TODO: Break this module up into pieces. Maybe group by functionality tested # rather than the socket level-ness of it. from urllib3 import HTTPConnectionPool, HTTPSConnectionPool from urllib3.poolmanager import proxy_from_url from urllib3.exceptions i... | null | null | null |
urllib3/urllib3 | train | 185 | fce51c7bdd5acbf6c6e01aaa9149025749a73bdc | train | test/test_connectionpool.py | train | urllib3/urllib3:test/test_connectionpool.py | 212 | 8 | self.assertEqual | test_pool_size | from __future__ import absolute_import
import unittest
from urllib3.connectionpool import (
connection_from_url,
HTTPConnection,
HTTPConnectionPool,
HTTPSConnectionPool,
)
from urllib3.response import httplib, HTTPResponse
from urllib3.util.timeout import Timeout
from urllib3.packages.six.moves.http_c... | POOL_SIZE) | added | 6cc093a6b88759bd6fdc5ffaa6409d036c917d3a458fb4fdbdbd759c7d079281 | self.assertEqual|test_pool_size|from __future__ import absolute_import import unittest from urllib3.connectionpool import ( connection_from_url, HTTPConnection, HTTPConnectionPool, HTTPSConnectionPool, ) from urllib3.response import httplib, HTTPResponse from urllib3.util.timeout import Timeout from urllib3.packages.si... | null | null | null |
urllib3/urllib3 | train | 185 | fce51c7bdd5acbf6c6e01aaa9149025749a73bdc | train | test/test_connectionpool.py | train | urllib3/urllib3:test/test_connectionpool.py | 217 | 8 | self.assertRaises | test_assert_same_host | from __future__ import absolute_import
import unittest
from urllib3.connectionpool import (
connection_from_url,
HTTPConnection,
HTTPConnectionPool,
HTTPSConnectionPool,
)
from urllib3.response import httplib, HTTPResponse
from urllib3.util.timeout import Timeout
from urllib3.packages.six.moves.http_c... | HostChangedError) | added | 74a22b3accec968945a06fb8f493eaaf9691172e9b5f8ffa1e7b5760e24df1b5 | self.assertRaises|test_assert_same_host|from __future__ import absolute_import import unittest from urllib3.connectionpool import ( connection_from_url, HTTPConnection, HTTPConnectionPool, HTTPSConnectionPool, ) from urllib3.response import httplib, HTTPResponse from urllib3.util.timeout import Timeout from urllib3.pac... | null | null | null |
urllib3/urllib3 | train | 185 | fce51c7bdd5acbf6c6e01aaa9149025749a73bdc | train | test/test_connectionpool.py | train | urllib3/urllib3:test/test_connectionpool.py | 275 | 8 | self.assertRaises | test_contextmanager | from __future__ import absolute_import
import unittest
from urllib3.connectionpool import (
connection_from_url,
HTTPConnection,
HTTPConnectionPool,
HTTPSConnectionPool,
)
from urllib3.response import httplib, HTTPResponse
from urllib3.util.timeout import Timeout
from urllib3.packages.six.moves.http_c... | ClosedPoolError) | modified | 09fd1580a6a8af6bdb0b8821bc82394f1305ed97d1440494b080b475829bc1cd | self.assertRaises|test_contextmanager|from __future__ import absolute_import import unittest from urllib3.connectionpool import ( connection_from_url, HTTPConnection, HTTPConnectionPool, HTTPSConnectionPool, ) from urllib3.response import httplib, HTTPResponse from urllib3.util.timeout import Timeout from urllib3.packa... | ClosedPoolError) | 277 | 8 |
urllib3/urllib3 | train | 185 | fce51c7bdd5acbf6c6e01aaa9149025749a73bdc | train | test/test_connectionpool.py | train | urllib3/urllib3:test/test_connectionpool.py | 385 | 8 | self.assertTrue | test_custom_http_response_class | from __future__ import absolute_import
import unittest
from urllib3.connectionpool import (
connection_from_url,
HTTPConnection,
HTTPConnectionPool,
HTTPSConnectionPool,
)
from urllib3.response import httplib, HTTPResponse
from urllib3.util.timeout import Timeout
from urllib3.packages.six.moves.http_c... | isinstance(response, CustomHTTPResponse)) | added | 3786139f214c6599e04eb68e5fe8507fcbd0c2fb1cfc6b133397cee5e6f3687f | self.assertTrue|test_custom_http_response_class|from __future__ import absolute_import import unittest from urllib3.connectionpool import ( connection_from_url, HTTPConnection, HTTPConnectionPool, HTTPSConnectionPool, ) from urllib3.response import httplib, HTTPResponse from urllib3.util.timeout import Timeout from url... | null | null | null |
urllib3/urllib3 | train | 186 | d53eccf27c3871d9b730068a4165275815ba23d2 | train | test/test_response.py | train | urllib3/urllib3:test/test_response.py | 239 | 8 | self.assertRaises | test_streaming | import unittest
from io import BytesIO, BufferedReader
from urllib3.response import HTTPResponse
from urllib3.exceptions import DecodeError, ResponseNotChunked, ProtocolError
from urllib3.packages.six.moves import http_client as httplib
from urllib3.util.retry import Retry
from base64 import b64decode
# A known ra... | StopIteration) | modified | e50a66d811fdc3b84556cb0785d7e85fdcb640cb6fa00725b751b6368a04f1a1 | self.assertRaises|test_streaming|import unittest from io import BytesIO, BufferedReader from urllib3.response import HTTPResponse from urllib3.exceptions import DecodeError, ResponseNotChunked, ProtocolError from urllib3.packages.six.moves import http_client as httplib from urllib3.util.retry import Retry from base64 i... | StopIteration) | 242 | 8 |
urllib3/urllib3 | train | 186 | d53eccf27c3871d9b730068a4165275815ba23d2 | train | test/test_response.py | train | urllib3/urllib3:test/test_response.py | 289 | 8 | self.assertEqual | test_gzipped_streaming_tell | import unittest
from io import BytesIO, BufferedReader
from urllib3.response import HTTPResponse
from urllib3.exceptions import DecodeError, ResponseNotChunked, ProtocolError
from urllib3.packages.six.moves import http_client as httplib
from urllib3.util.retry import Retry
from base64 import b64decode
# A known ra... | resp.tell()) | modified | 6ea7b3d290d30df5c455d57495463dd321db32fafe9cc73ad3f8379fee85f7b3 | self.assertEqual|test_gzipped_streaming_tell|import unittest from io import BytesIO, BufferedReader from urllib3.response import HTTPResponse from urllib3.exceptions import DecodeError, ResponseNotChunked, ProtocolError from urllib3.packages.six.moves import http_client as httplib from urllib3.util.retry import Retry f... | resp.tell()) | 292 | 8 |
urllib3/urllib3 | train | 186 | d53eccf27c3871d9b730068a4165275815ba23d2 | train | test/test_response.py | train | urllib3/urllib3:test/test_response.py | 356 | 8 | self.assertRaises | test_deflate_streaming | import unittest
from io import BytesIO, BufferedReader
from urllib3.response import HTTPResponse
from urllib3.exceptions import DecodeError, ResponseNotChunked, ProtocolError
from urllib3.packages.six.moves import http_client as httplib
from urllib3.util.retry import Retry
from base64 import b64decode
# A known ra... | StopIteration) | modified | 0a9d78f006e089c1add13338681be838f6bda51cf9d00f79b774740d011c0a93 | self.assertRaises|test_deflate_streaming|import unittest from io import BytesIO, BufferedReader from urllib3.response import HTTPResponse from urllib3.exceptions import DecodeError, ResponseNotChunked, ProtocolError from urllib3.packages.six.moves import http_client as httplib from urllib3.util.retry import Retry from ... | StopIteration) | 359 | 8 |
urllib3/urllib3 | train | 186 | d53eccf27c3871d9b730068a4165275815ba23d2 | train | test/test_response.py | train | urllib3/urllib3:test/test_response.py | 523 | 8 | self.assertEqual | test_get_case_insensitive_headers | import unittest
from io import BytesIO, BufferedReader
from urllib3.response import HTTPResponse
from urllib3.exceptions import DecodeError, ResponseNotChunked, ProtocolError
from urllib3.packages.six.moves import http_client as httplib
from urllib3.util.retry import Retry
from base64 import b64decode
# A known ra... | 'example.com') | modified | ccbaa884266c03143e8dccdf7bd40bea527b27c4dccac753cc8d4da63c5a10d9 | self.assertEqual|test_get_case_insensitive_headers|import unittest from io import BytesIO, BufferedReader from urllib3.response import HTTPResponse from urllib3.exceptions import DecodeError, ResponseNotChunked, ProtocolError from urllib3.packages.six.moves import http_client as httplib from urllib3.util.retry import R... | 'example.com') | 526 | 8 |
urllib3/urllib3 | train | 186 | d53eccf27c3871d9b730068a4165275815ba23d2 | train | test/with_dummyserver/test_connectionpool.py | train | urllib3/urllib3:test/with_dummyserver/test_connectionpool.py | 159 | 8 | self.assertRaises | test_connect_timeout | import errno
import logging
import socket
import sys
import unittest
import time
import warnings
import mock
from .. import (
requires_network, onlyPy3, onlyPy26OrOlder,
TARPIT_HOST, VALID_SOURCE_ADDRESSES, INVALID_SOURCE_ADDRESSES,
)
from ..port_helpers import find_unused_port
from urllib3 import (
encod... | ConnectTimeoutError) | modified | ecf673be472a1a04cc24ab305b6393a6ddec8f9c8d84f2b99c676c663d865af8 | self.assertRaises|test_connect_timeout|import errno import logging import socket import sys import unittest import time import warnings import mock from .. import ( requires_network, onlyPy3, onlyPy26OrOlder, TARPIT_HOST, VALID_SOURCE_ADDRESSES, INVALID_SOURCE_ADDRESSES, ) from ..port_helpers import find_unused_port fr... | MaxRetryError) | 157 | 8 |
urllib3/urllib3 | train | 186 | d53eccf27c3871d9b730068a4165275815ba23d2 | train | test/with_dummyserver/test_connectionpool.py | train | urllib3/urllib3:test/with_dummyserver/test_connectionpool.py | 230 | 8 | self.assertEqual | test_wrong_specific_method | import errno
import logging
import socket
import sys
import unittest
import time
import warnings
import mock
from .. import (
requires_network, onlyPy3, onlyPy26OrOlder,
TARPIT_HOST, VALID_SOURCE_ADDRESSES, INVALID_SOURCE_ADDRESSES,
)
from ..port_helpers import find_unused_port
from urllib3 import (
encod... | r.data) | modified | 7ed0b2d7570b4a1aab0a0a7c821e9173fd5219472152b5688ea12ee88ba4386d | self.assertEqual|test_wrong_specific_method|import errno import logging import socket import sys import unittest import time import warnings import mock from .. import ( requires_network, onlyPy3, onlyPy26OrOlder, TARPIT_HOST, VALID_SOURCE_ADDRESSES, INVALID_SOURCE_ADDRESSES, ) from ..port_helpers import find_unused_po... | r.data) | 230 | 8 |
urllib3/urllib3 | train | 186 | d53eccf27c3871d9b730068a4165275815ba23d2 | train | test/with_dummyserver/test_connectionpool.py | train | urllib3/urllib3:test/with_dummyserver/test_connectionpool.py | 383 | 8 | self.assertEqual | test_redirect | import errno
import logging
import socket
import sys
import unittest
import time
import warnings
import mock
from .. import (
requires_network, onlyPy3, onlyPy26OrOlder,
TARPIT_HOST, VALID_SOURCE_ADDRESSES, INVALID_SOURCE_ADDRESSES,
)
from ..port_helpers import find_unused_port
from urllib3 import (
encod... | b'Dummy server!') | modified | 010aeb55e1c10b76cf52effd419f2e37298cca23a460a7285d43585e22445ee2 | self.assertEqual|test_redirect|import errno import logging import socket import sys import unittest import time import warnings import mock from .. import ( requires_network, onlyPy3, onlyPy26OrOlder, TARPIT_HOST, VALID_SOURCE_ADDRESSES, INVALID_SOURCE_ADDRESSES, ) from ..port_helpers import find_unused_port from urlli... | 200) | 386 | 8 |
urllib3/urllib3 | train | 186 | d53eccf27c3871d9b730068a4165275815ba23d2 | train | test/with_dummyserver/test_connectionpool.py | train | urllib3/urllib3:test/with_dummyserver/test_connectionpool.py | 713 | 8 | self.assertRaises | test_disabled_retry | import errno
import logging
import socket
import sys
import unittest
import time
import warnings
import mock
from .. import (
requires_network, onlyPy3, onlyPy26OrOlder,
TARPIT_HOST, VALID_SOURCE_ADDRESSES, INVALID_SOURCE_ADDRESSES,
)
from ..port_helpers import find_unused_port
from urllib3 import (
encod... | NewConnectionError) | added | 6d867d2725c6f098260479768b24ea64f1c069a8ef649e6009361de592d54787 | self.assertRaises|test_disabled_retry|import errno import logging import socket import sys import unittest import time import warnings import mock from .. import ( requires_network, onlyPy3, onlyPy26OrOlder, TARPIT_HOST, VALID_SOURCE_ADDRESSES, INVALID_SOURCE_ADDRESSES, ) from ..port_helpers import find_unused_port fro... | null | null | null |
urllib3/urllib3 | train | 187 | 65b8c52c16dee5c3a523de2c1c21853ba0e581f2 | train | test/test_response.py | train | urllib3/urllib3:test/test_response.py | 63 | 8 | self.assertEqual | test_preload | import unittest
from io import BytesIO, BufferedReader
from urllib3.response import HTTPResponse
from urllib3.exceptions import (
DecodeError, ResponseNotChunked, ProtocolError, InvalidHeader
)
from urllib3.packages.six.moves import http_client as httplib
from urllib3.util.retry import Retry
from base64 import ... | b'foo') | modified | 90c214ed36bddd1fa671d6278a9f96a8a508f5109a4089e6e33ab8883954b7bd | self.assertEqual|test_preload|import unittest from io import BytesIO, BufferedReader from urllib3.response import HTTPResponse from urllib3.exceptions import ( DecodeError, ResponseNotChunked, ProtocolError, InvalidHeader ) from urllib3.packages.six.moves import http_client as httplib from urllib3.util.retry import Ret... | b'foo') | 61 | 8 |
urllib3/urllib3 | train | 187 | 65b8c52c16dee5c3a523de2c1c21853ba0e581f2 | train | test/test_response.py | train | urllib3/urllib3:test/test_response.py | 241 | 8 | self.assertRaises | test_streaming | import unittest
from io import BytesIO, BufferedReader
from urllib3.response import HTTPResponse
from urllib3.exceptions import (
DecodeError, ResponseNotChunked, ProtocolError, InvalidHeader
)
from urllib3.packages.six.moves import http_client as httplib
from urllib3.util.retry import Retry
from base64 import ... | StopIteration) | modified | 395a4a7b566a6980ef384a56e617905d56a44c730b08e141d1edbbacb3198d1f | self.assertRaises|test_streaming|import unittest from io import BytesIO, BufferedReader from urllib3.response import HTTPResponse from urllib3.exceptions import ( DecodeError, ResponseNotChunked, ProtocolError, InvalidHeader ) from urllib3.packages.six.moves import http_client as httplib from urllib3.util.retry import ... | StopIteration) | 239 | 8 |
urllib3/urllib3 | train | 187 | 65b8c52c16dee5c3a523de2c1c21853ba0e581f2 | train | test/test_response.py | train | urllib3/urllib3:test/test_response.py | 338 | 8 | self.assertEqual | test_deflate_streaming_tell_intermediate_point | import unittest
from io import BytesIO, BufferedReader
from urllib3.response import HTTPResponse
from urllib3.exceptions import (
DecodeError, ResponseNotChunked, ProtocolError, InvalidHeader
)
from urllib3.packages.six.moves import http_client as httplib
from urllib3.util.retry import Retry
from base64 import ... | payload) | modified | 693b414675441504c78f6a8ca798aefe5fe5e382f0e3c61ef2ab4bdb8f43c41c | self.assertEqual|test_deflate_streaming_tell_intermediate_point|import unittest from io import BytesIO, BufferedReader from urllib3.response import HTTPResponse from urllib3.exceptions import ( DecodeError, ResponseNotChunked, ProtocolError, InvalidHeader ) from urllib3.packages.six.moves import http_client as httplib ... | payload) | 336 | 8 |
urllib3/urllib3 | train | 187 | 65b8c52c16dee5c3a523de2c1c21853ba0e581f2 | train | test/test_response.py | train | urllib3/urllib3:test/test_response.py | 592 | 8 | self.assertEqual | test_get_case_insensitive_headers | import unittest
from io import BytesIO, BufferedReader
from urllib3.response import HTTPResponse
from urllib3.exceptions import (
DecodeError, ResponseNotChunked, ProtocolError, InvalidHeader
)
from urllib3.packages.six.moves import http_client as httplib
from urllib3.util.retry import Retry
from base64 import ... | 'example.com') | added | 1a4b0a35fa32e57edd8bbedfa700e71a4cd3744ab7dcdd35719078b021f86b29 | self.assertEqual|test_get_case_insensitive_headers|import unittest from io import BytesIO, BufferedReader from urllib3.response import HTTPResponse from urllib3.exceptions import ( DecodeError, ResponseNotChunked, ProtocolError, InvalidHeader ) from urllib3.packages.six.moves import http_client as httplib from urllib3.... | null | null | null |
urllib3/urllib3 | train | 187 | 65b8c52c16dee5c3a523de2c1c21853ba0e581f2 | train | test/with_dummyserver/test_socketlevel.py | train | urllib3/urllib3:test/with_dummyserver/test_socketlevel.py | 1,111 | 8 | self.assertRaises | test_enforce_content_length_get | # TODO: Break this module up into pieces. Maybe group by functionality tested
# rather than the socket level-ness of it.
from urllib3 import HTTPConnectionPool, HTTPSConnectionPool
from urllib3.poolmanager import proxy_from_url
from urllib3.exceptions import (
MaxRetryError,
ProxyError,
Connect... | ProtocolError) | added | 55e68d541d6c45851bb7cf841f7cf0681e8a1d4191ecc85ce626ff5a657b4ca0 | self.assertRaises|test_enforce_content_length_get|# TODO: Break this module up into pieces. Maybe group by functionality tested # rather than the socket level-ness of it. from urllib3 import HTTPConnectionPool, HTTPSConnectionPool from urllib3.poolmanager import proxy_from_url from urllib3.exceptions import ( MaxRetryE... | null | null | null |
urllib3/urllib3 | train | 188 | 7cab63c0e220b27635964e39b19b8a0c6e24afa2 | train | test/with_dummyserver/test_socketlevel.py | train | urllib3/urllib3:test/with_dummyserver/test_socketlevel.py | 1,115 | 12 | self.assertTrue | test_enforce_content_length_get | # TODO: Break this module up into pieces. Maybe group by functionality tested
# rather than the socket level-ness of it.
from urllib3 import HTTPConnectionPool, HTTPSConnectionPool
from urllib3.poolmanager import proxy_from_url
from urllib3.exceptions import (
MaxRetryError,
ProxyError,
Connect... | '12 bytes read, 10 more expected' in str(e)) | added | 17fdb1e0be7dc70e9df5ffc57985444a262dddf92f4661d622a05d586f441aaa | self.assertTrue|test_enforce_content_length_get|# TODO: Break this module up into pieces. Maybe group by functionality tested # rather than the socket level-ness of it. from urllib3 import HTTPConnectionPool, HTTPSConnectionPool from urllib3.poolmanager import proxy_from_url from urllib3.exceptions import ( MaxRetryErr... | null | null | null |
urllib3/urllib3 | train | 189 | c74bd70c3a97e30f0560bee9b7fa1bfc767ebf0b | train | test/with_dummyserver/test_https.py | train | urllib3/urllib3:test/with_dummyserver/test_https.py | 144 | 16 | self.assertEqual | test_context_combines_with_ca_certs | import datetime
import logging
import ssl
import sys
import unittest
import warnings
import mock
from nose.plugins.skip import SkipTest
from dummyserver.testcase import (
HTTPSDummyServerTestCase, IPV6HTTPSDummyServerTestCase
)
from dummyserver.server import (DEFAULT_CA, DEFAULT_CA_BAD, DEFAULT_CERTS,
... | InsecurePlatformWarning) | modified | cb386ed0ed48d209c9d555a8eec9fa19df35ad08d09f450fb6b8f92244893492 | self.assertEqual|test_context_combines_with_ca_certs|import datetime import logging import ssl import sys import unittest import warnings import mock from nose.plugins.skip import SkipTest from dummyserver.testcase import ( HTTPSDummyServerTestCase, IPV6HTTPSDummyServerTestCase ) from dummyserver.server import (DEFAULT... | InsecurePlatformWarning) | 143 | 16 |
urllib3/urllib3 | train | 189 | c74bd70c3a97e30f0560bee9b7fa1bfc767ebf0b | train | test/with_dummyserver/test_https.py | train | urllib3/urllib3:test/with_dummyserver/test_https.py | 175 | 12 | self.assertTrue | test_invalid_common_name | import datetime
import logging
import ssl
import sys
import unittest
import warnings
import mock
from nose.plugins.skip import SkipTest
from dummyserver.testcase import (
HTTPSDummyServerTestCase, IPV6HTTPSDummyServerTestCase
)
from dummyserver.server import (DEFAULT_CA, DEFAULT_CA_BAD, DEFAULT_CERTS,
... | "doesn't match" in str(e)) | modified | 6d6b1f05da5f99492388479857da84d6524c1e18fc0a72209a358a88649b66f8 | self.assertTrue|test_invalid_common_name|import datetime import logging import ssl import sys import unittest import warnings import mock from nose.plugins.skip import SkipTest from dummyserver.testcase import ( HTTPSDummyServerTestCase, IPV6HTTPSDummyServerTestCase ) from dummyserver.server import (DEFAULT_CA, DEFAULT... | "doesn't match" in str(e)) | 174 | 12 |
urllib3/urllib3 | train | 189 | c74bd70c3a97e30f0560bee9b7fa1bfc767ebf0b | train | test/with_dummyserver/test_https.py | train | urllib3/urllib3:test/with_dummyserver/test_https.py | 222 | 12 | self.assertTrue | test_unverified_ssl | import datetime
import logging
import ssl
import sys
import unittest
import warnings
import mock
from nose.plugins.skip import SkipTest
from dummyserver.testcase import (
HTTPSDummyServerTestCase, IPV6HTTPSDummyServerTestCase
)
from dummyserver.server import (DEFAULT_CA, DEFAULT_CA_BAD, DEFAULT_CERTS,
... | warn.called) | modified | 3b12627e5c3400b87dbf05310add7ec08689cd98b008657446f177d8732ad345 | self.assertTrue|test_unverified_ssl|import datetime import logging import ssl import sys import unittest import warnings import mock from nose.plugins.skip import SkipTest from dummyserver.testcase import ( HTTPSDummyServerTestCase, IPV6HTTPSDummyServerTestCase ) from dummyserver.server import (DEFAULT_CA, DEFAULT_CA_B... | warn.called) | 221 | 12 |
urllib3/urllib3 | train | 189 | c74bd70c3a97e30f0560bee9b7fa1bfc767ebf0b | train | test/with_dummyserver/test_https.py | train | urllib3/urllib3:test/with_dummyserver/test_https.py | 475 | 8 | self.assertRaises | test_set_ssl_version_to_sslv3 | import datetime
import logging
import ssl
import sys
import unittest
import warnings
import mock
from nose.plugins.skip import SkipTest
from dummyserver.testcase import (
HTTPSDummyServerTestCase, IPV6HTTPSDummyServerTestCase
)
from dummyserver.server import (DEFAULT_CA, DEFAULT_CA_BAD, DEFAULT_CERTS,
... | SSLError) | modified | a15255a7596deb6815da89dc2bcd394fd77adf095d29d02ace1ac877ede67571 | self.assertRaises|test_set_ssl_version_to_sslv3|import datetime import logging import ssl import sys import unittest import warnings import mock from nose.plugins.skip import SkipTest from dummyserver.testcase import ( HTTPSDummyServerTestCase, IPV6HTTPSDummyServerTestCase ) from dummyserver.server import (DEFAULT_CA, ... | SSLError) | 474 | 8 |
urllib3/urllib3 | train | 190 | 0fb5e083b2adf7618db8c26e8e50206de09dd845 | train | test/test_response.py | train | urllib3/urllib3:test/test_response.py | 77 | 8 | self.assertRaises | test_decode_bad_data | import unittest
import socket
from io import BytesIO, BufferedReader
from urllib3.response import HTTPResponse
from urllib3.exceptions import (
DecodeError, ResponseNotChunked, ProtocolError, InvalidHeader
)
from urllib3.packages.six.moves import http_client as httplib
from urllib3.util.retry import Retry
from ur... | DecodeError) | modified | 03d39aad449ae69d27a3af40cb92f12d3365bff364cda0ecd332d00b95f600dc | self.assertRaises|test_decode_bad_data|import unittest import socket from io import BytesIO, BufferedReader from urllib3.response import HTTPResponse from urllib3.exceptions import ( DecodeError, ResponseNotChunked, ProtocolError, InvalidHeader ) from urllib3.packages.six.moves import http_client as httplib from urllib... | DecodeError) | 76 | 8 |
urllib3/urllib3 | train | 190 | 0fb5e083b2adf7618db8c26e8e50206de09dd845 | train | test/test_response.py | train | urllib3/urllib3:test/test_response.py | 255 | 8 | self.assertRaises | test_streaming | import unittest
import socket
from io import BytesIO, BufferedReader
from urllib3.response import HTTPResponse
from urllib3.exceptions import (
DecodeError, ResponseNotChunked, ProtocolError, InvalidHeader
)
from urllib3.packages.six.moves import http_client as httplib
from urllib3.util.retry import Retry
from ur... | StopIteration) | added | d778a5193d3d516ecff08d0dc583a1280b38f7ff2f785ff9bc5c6883e480b459 | self.assertRaises|test_streaming|import unittest import socket from io import BytesIO, BufferedReader from urllib3.response import HTTPResponse from urllib3.exceptions import ( DecodeError, ResponseNotChunked, ProtocolError, InvalidHeader ) from urllib3.packages.six.moves import http_client as httplib from urllib3.util... | null | null | null |
urllib3/urllib3 | train | 190 | 0fb5e083b2adf7618db8c26e8e50206de09dd845 | train | test/test_response.py | train | urllib3/urllib3:test/test_response.py | 394 | 8 | self.assertRaises | test_empty_stream | import unittest
import socket
from io import BytesIO, BufferedReader
from urllib3.response import HTTPResponse
from urllib3.exceptions import (
DecodeError, ResponseNotChunked, ProtocolError, InvalidHeader
)
from urllib3.packages.six.moves import http_client as httplib
from urllib3.util.retry import Retry
from ur... | StopIteration) | added | 93fbc5c0108270d8d7d79a25347a11a6b0eed9915f66524b27cd4e7294c2b57e | self.assertRaises|test_empty_stream|import unittest import socket from io import BytesIO, BufferedReader from urllib3.response import HTTPResponse from urllib3.exceptions import ( DecodeError, ResponseNotChunked, ProtocolError, InvalidHeader ) from urllib3.packages.six.moves import http_client as httplib from urllib3.u... | null | null | null |
urllib3/urllib3 | train | 190 | 0fb5e083b2adf7618db8c26e8e50206de09dd845 | train | test/test_response.py | train | urllib3/urllib3:test/test_response.py | 438 | 8 | self.assertRaises | test_length_with_multiple_content_lengths | import unittest
import socket
from io import BytesIO, BufferedReader
from urllib3.response import HTTPResponse
from urllib3.exceptions import (
DecodeError, ResponseNotChunked, ProtocolError, InvalidHeader
)
from urllib3.packages.six.moves import http_client as httplib
from urllib3.util.retry import Retry
from ur... | InvalidHeader) | added | 87cf4dfbc11163c1aa64e6321d3c8fa3c03557e3fe1cff840a35ebc6a1b5f80b | self.assertRaises|test_length_with_multiple_content_lengths|import unittest import socket from io import BytesIO, BufferedReader from urllib3.response import HTTPResponse from urllib3.exceptions import ( DecodeError, ResponseNotChunked, ProtocolError, InvalidHeader ) from urllib3.packages.six.moves import http_client a... | null | null | null |
urllib3/urllib3 | train | 191 | 3de23d0edef737a8b72d33140a3ad44af19a565b | train | test/contrib/test_pyopenssl.py | train | urllib3/urllib3:test/contrib/test_pyopenssl.py | 38 | 8 | self.assertEqual | test_dnsname_to_stdlib_simple | # -*- coding: utf-8 -*-
import unittest
from nose.plugins.skip import SkipTest
from urllib3.packages import six
try:
from urllib3.contrib.pyopenssl import (inject_into_urllib3,
extract_from_urllib3,
_dnsname_to_stdlib)
except Im... | expected_result) | added | cde5d7b7ea4847feb2662fd1083c297dd4996f8950ca706046f1b82905b0c29d | self.assertEqual|test_dnsname_to_stdlib_simple|# -*- coding: utf-8 -*- import unittest from nose.plugins.skip import SkipTest from urllib3.packages import six try: from urllib3.contrib.pyopenssl import (inject_into_urllib3, extract_from_urllib3, _dnsname_to_stdlib) except ImportError as e: raise SkipTest('Could not imp... | null | null | null |
urllib3/urllib3 | train | 191 | 3de23d0edef737a8b72d33140a3ad44af19a565b | train | test/contrib/test_pyopenssl.py | train | urllib3/urllib3:test/contrib/test_pyopenssl.py | 47 | 8 | self.assertEqual | test_dnsname_to_stdlib_leading_period | # -*- coding: utf-8 -*-
import unittest
from nose.plugins.skip import SkipTest
from urllib3.packages import six
try:
from urllib3.contrib.pyopenssl import (inject_into_urllib3,
extract_from_urllib3,
_dnsname_to_stdlib)
except Im... | expected_result) | added | 1e59564b737e0926d65ecf27d68e93a06a2639fea58fea2c6923d3a0b855d4d6 | self.assertEqual|test_dnsname_to_stdlib_leading_period|# -*- coding: utf-8 -*- import unittest from nose.plugins.skip import SkipTest from urllib3.packages import six try: from urllib3.contrib.pyopenssl import (inject_into_urllib3, extract_from_urllib3, _dnsname_to_stdlib) except ImportError as e: raise SkipTest('Could... | null | null | null |
urllib3/urllib3 | train | 191 | 3de23d0edef737a8b72d33140a3ad44af19a565b | train | test/contrib/test_pyopenssl.py | train | urllib3/urllib3:test/contrib/test_pyopenssl.py | 57 | 8 | self.assertEqual | test_dnsname_to_stdlib_leading_splat | # -*- coding: utf-8 -*-
import unittest
from nose.plugins.skip import SkipTest
from urllib3.packages import six
try:
from urllib3.contrib.pyopenssl import (inject_into_urllib3,
extract_from_urllib3,
_dnsname_to_stdlib)
except Im... | expected_result) | added | d7113cc68c5234cebd72d959b833a25b76b4219aabb42ba2201a039065e589d7 | self.assertEqual|test_dnsname_to_stdlib_leading_splat|# -*- coding: utf-8 -*- import unittest from nose.plugins.skip import SkipTest from urllib3.packages import six try: from urllib3.contrib.pyopenssl import (inject_into_urllib3, extract_from_urllib3, _dnsname_to_stdlib) except ImportError as e: raise SkipTest('Could ... | null | null | null |
urllib3/urllib3 | train | 192 | 29b9ddadc7664a329e4c4978baa53d3025face24 | train | test/contrib/test_gae_manager.py | train | urllib3/urllib3:test/contrib/test_gae_manager.py | 93 | 8 | self.assertRaises | test_exceptions | import unittest
from dummyserver.testcase import HTTPSDummyServerTestCase
from nose.plugins.skip import SkipTest
try:
from google.appengine.api import urlfetch
(urlfetch)
except ImportError:
raise SkipTest("App Engine SDK not available.")
from urllib3.contrib.appengine import AppEngineManager, AppEngineP... | AppEnginePlatformError) | modified | 470170738e4b7cf3afc3c22f2fb5567e7c994cd87be50721931d662c95781af8 | self.assertRaises|test_exceptions|import unittest from dummyserver.testcase import HTTPSDummyServerTestCase from nose.plugins.skip import SkipTest try: from google.appengine.api import urlfetch (urlfetch) except ImportError: raise SkipTest("App Engine SDK not available.") from urllib3.contrib.appengine import AppEngine... | AppEnginePlatformError) | 93 | 8 |
urllib3/urllib3 | train | 192 | 29b9ddadc7664a329e4c4978baa53d3025face24 | train | test/contrib/test_gae_manager.py | train | urllib3/urllib3:test/contrib/test_gae_manager.py | 153 | 8 | self.assertRaises | test_exceptions | import unittest
from dummyserver.testcase import HTTPSDummyServerTestCase
from nose.plugins.skip import SkipTest
try:
from google.appengine.api import urlfetch
(urlfetch)
except ImportError:
raise SkipTest("App Engine SDK not available.")
from urllib3.contrib.appengine import AppEngineManager, AppEngineP... | SSLError) | modified | cea2d774d79526781ec016f893bb567e6c468316ed09c4645c5e4fd2c4630df3 | self.assertRaises|test_exceptions|import unittest from dummyserver.testcase import HTTPSDummyServerTestCase from nose.plugins.skip import SkipTest try: from google.appengine.api import urlfetch (urlfetch) except ImportError: raise SkipTest("App Engine SDK not available.") from urllib3.contrib.appengine import AppEngine... | SSLError) | 153 | 8 |
urllib3/urllib3 | train | 192 | 29b9ddadc7664a329e4c4978baa53d3025face24 | train | test/test_retry.py | train | urllib3/urllib3:test/test_retry.py | 170 | 8 | self.assertTrue | test_method_whitelist_with_status_forcelist | import unittest
from urllib3.response import HTTPResponse
from urllib3.packages.six.moves import xrange
from urllib3.util.retry import Retry, RequestHistory
from urllib3.exceptions import (
ConnectTimeoutError,
MaxRetryError,
ReadTimeoutError,
ResponseError,
)
class RetryTest(unittest.TestCase):
... | retry.is_retry('GET', status_code=500)) | modified | e5e0f299c3971877ff6a998a8f7ac328b9a8808bdb10b7823a02c7b6f667ab07 | self.assertTrue|test_method_whitelist_with_status_forcelist|import unittest from urllib3.response import HTTPResponse from urllib3.packages.six.moves import xrange from urllib3.util.retry import Retry, RequestHistory from urllib3.exceptions import ( ConnectTimeoutError, MaxRetryError, ReadTimeoutError, ResponseError, )... | retry.is_forced_retry('GET', status_code=500)) | 170 | 8 |
urllib3/urllib3 | train | 192 | 29b9ddadc7664a329e4c4978baa53d3025face24 | train | test/test_retry.py | train | urllib3/urllib3:test/test_retry.py | 184 | 8 | self.assertRaises | test_disabled | import unittest
from urllib3.response import HTTPResponse
from urllib3.packages.six.moves import xrange
from urllib3.util.retry import Retry, RequestHistory
from urllib3.exceptions import (
ConnectTimeoutError,
MaxRetryError,
ReadTimeoutError,
ResponseError,
)
class RetryTest(unittest.TestCase):
... | MaxRetryError) | modified | 3da2c00421533eff93f992b1f03d9756819b6bc3af0305d9274c2097b2ef5100 | self.assertRaises|test_disabled|import unittest from urllib3.response import HTTPResponse from urllib3.packages.six.moves import xrange from urllib3.util.retry import Retry, RequestHistory from urllib3.exceptions import ( ConnectTimeoutError, MaxRetryError, ReadTimeoutError, ResponseError, ) class RetryTest(unittest.Te... | MaxRetryError) | 184 | 8 |
urllib3/urllib3 | train | 192 | 29b9ddadc7664a329e4c4978baa53d3025face24 | train | test/test_retry.py | train | urllib3/urllib3:test/test_retry.py | 232 | 8 | self.assertEqual | test_history | import unittest
from urllib3.response import HTTPResponse
from urllib3.packages.six.moves import xrange
from urllib3.util.retry import Retry, RequestHistory
from urllib3.exceptions import (
ConnectTimeoutError,
MaxRetryError,
ReadTimeoutError,
ResponseError,
)
class RetryTest(unittest.TestCase):
... | (RequestHistory('GET', '/test1', connection_error, None, None),)) | modified | 5bade271ca412aeefc3d477ef93d29a0bfb2a06b9a89de29335192da1bf05321 | self.assertEqual|test_history|import unittest from urllib3.response import HTTPResponse from urllib3.packages.six.moves import xrange from urllib3.util.retry import Retry, RequestHistory from urllib3.exceptions import ( ConnectTimeoutError, MaxRetryError, ReadTimeoutError, ResponseError, ) class RetryTest(unittest.Test... | (RequestHistory('GET', '/test1', connection_error, None, None),)) | 232 | 8 |
urllib3/urllib3 | train | 192 | 29b9ddadc7664a329e4c4978baa53d3025face24 | train | test/with_dummyserver/test_connectionpool.py | train | urllib3/urllib3:test/with_dummyserver/test_connectionpool.py | 188 | 8 | self.assertRaises | test_total_timeout | import errno
import logging
import socket
import sys
import unittest
import time
import warnings
from datetime import datetime
from datetime import timedelta
import mock
from .. import (
requires_network, onlyPy3, onlyPy26OrOlder,
TARPIT_HOST, VALID_SOURCE_ADDRESSES, INVALID_SOURCE_ADDRESSES,
)
from ..port_h... | ReadTimeoutError) | modified | c0e72a52bdf121015ac32717ac68895f3603e87239df0ca78a9cd18975164f44 | self.assertRaises|test_total_timeout|import errno import logging import socket import sys import unittest import time import warnings from datetime import datetime from datetime import timedelta import mock from .. import ( requires_network, onlyPy3, onlyPy26OrOlder, TARPIT_HOST, VALID_SOURCE_ADDRESSES, INVALID_SOURCE_... | ReadTimeoutError) | 185 | 8 |
urllib3/urllib3 | train | 192 | 29b9ddadc7664a329e4c4978baa53d3025face24 | train | test/with_dummyserver/test_connectionpool.py | train | urllib3/urllib3:test/with_dummyserver/test_connectionpool.py | 314 | 8 | self.assertTrue | test_disable_default_socket_options | import errno
import logging
import socket
import sys
import unittest
import time
import warnings
from datetime import datetime
from datetime import timedelta
import mock
from .. import (
requires_network, onlyPy3, onlyPy26OrOlder,
TARPIT_HOST, VALID_SOURCE_ADDRESSES, INVALID_SOURCE_ADDRESSES,
)
from ..port_h... | using_nagle) | modified | c68df8fb353b945a1d4fe4c0c4a4abfe5035d53af5b63930a6b848d0284ce433 | self.assertTrue|test_disable_default_socket_options|import errno import logging import socket import sys import unittest import time import warnings from datetime import datetime from datetime import timedelta import mock from .. import ( requires_network, onlyPy3, onlyPy26OrOlder, TARPIT_HOST, VALID_SOURCE_ADDRESSES, ... | using_nagle) | 311 | 8 |
urllib3/urllib3 | train | 192 | 29b9ddadc7664a329e4c4978baa53d3025face24 | train | test/with_dummyserver/test_connectionpool.py | train | urllib3/urllib3:test/with_dummyserver/test_connectionpool.py | 863 | 8 | self.assertTrue | test_redirect_after | import errno
import logging
import socket
import sys
import unittest
import time
import warnings
from datetime import datetime
from datetime import timedelta
import mock
from .. import (
requires_network, onlyPy3, onlyPy26OrOlder,
TARPIT_HOST, VALID_SOURCE_ADDRESSES, INVALID_SOURCE_ADDRESSES,
)
from ..port_h... | delta >= 1) | added | 99feb3d9e0a1843d2b29ea19af08d84a4b594e1358bfb0a815f078651979f07e | self.assertTrue|test_redirect_after|import errno import logging import socket import sys import unittest import time import warnings from datetime import datetime from datetime import timedelta import mock from .. import ( requires_network, onlyPy3, onlyPy26OrOlder, TARPIT_HOST, VALID_SOURCE_ADDRESSES, INVALID_SOURCE_A... | null | null | null |
urllib3/urllib3 | train | 193 | 438ed547ad7f165757a61174ae2e8aa20b4f6e30 | train | test/test_util.py | train | urllib3/urllib3:test/test_util.py | 246 | 8 | self.assertEqual | test_make_headers | import hashlib
import warnings
import logging
import unittest
import ssl
import socket
from itertools import chain
from mock import patch, Mock
from urllib3 import add_stderr_logger, disable_warnings
from urllib3.util.request import make_headers
from urllib3.util.retry import Retry
from urllib3.util.timeout import Ti... | {'authorization': 'Basic Zm9vOmJhcg=='}) | modified | cacea68e84ed4d0d22735bc9a441f7ca4c65810ecbc0262ddc409af11cff3bd2 | self.assertEqual|test_make_headers|import hashlib import warnings import logging import unittest import ssl import socket from itertools import chain from mock import patch, Mock from urllib3 import add_stderr_logger, disable_warnings from urllib3.util.request import make_headers from urllib3.util.retry import Retry fr... | {'proxy-authorization': 'Basic Zm9vOmJhcg=='}) | 245 | 8 |
urllib3/urllib3 | train | 193 | 438ed547ad7f165757a61174ae2e8aa20b4f6e30 | train | test/test_util.py | train | urllib3/urllib3:test/test_util.py | 299 | 12 | self.assertTrue | test_invalid_timeouts | import hashlib
import warnings
import logging
import unittest
import ssl
import socket
from itertools import chain
from mock import patch, Mock
from urllib3 import add_stderr_logger, disable_warnings
from urllib3.util.request import make_headers
from urllib3.util.retry import Retry
from urllib3.util.timeout import Ti... | 'less than' in str(e)) | modified | 45d364d23885c3d74c96f1d323384f262b5bc0d51c0ad864f0da655c67ae23dc | self.assertTrue|test_invalid_timeouts|import hashlib import warnings import logging import unittest import ssl import socket from itertools import chain from mock import patch, Mock from urllib3 import add_stderr_logger, disable_warnings from urllib3.util.request import make_headers from urllib3.util.retry import Retry... | 'less than' in str(e)) | 299 | 12 |
urllib3/urllib3 | train | 193 | 438ed547ad7f165757a61174ae2e8aa20b4f6e30 | train | test/test_util.py | train | urllib3/urllib3:test/test_util.py | 467 | 8 | assert_* | test_ssl_wrap_socket_loads_certificate_directories | import hashlib
import warnings
import logging
import unittest
import ssl
import socket
from itertools import chain
from mock import patch, Mock
from urllib3 import add_stderr_logger, disable_warnings
from urllib3.util.request import make_headers
from urllib3.util.retry import Retry
from urllib3.util.timeout import Ti... | '/path/to/pems') | added | a6fab093a3193251fa9ccf17a36a246373efb6c0918730770d54455e0ce6d83a | assert_*|test_ssl_wrap_socket_loads_certificate_directories|import hashlib import warnings import logging import unittest import ssl import socket from itertools import chain from mock import patch, Mock from urllib3 import add_stderr_logger, disable_warnings from urllib3.util.request import make_headers from urllib3.u... | null | null | null |
urllib3/urllib3 | train | 193 | 438ed547ad7f165757a61174ae2e8aa20b4f6e30 | train | test/test_util.py | train | urllib3/urllib3:test/test_util.py | 488 | 8 | assert_* | test_ssl_wrap_socket_with_no_sni_warns | import hashlib
import warnings
import logging
import unittest
import ssl
import socket
from itertools import chain
from mock import patch, Mock
from urllib3 import add_stderr_logger, disable_warnings
from urllib3.util.request import make_headers
from urllib3.util.retry import Retry
from urllib3.util.timeout import Ti... | socket) | added | 5cd04925ea416af2d4f1f6efda8474c24a36dc059132d1abea52c0fa2fa810cd | assert_*|test_ssl_wrap_socket_with_no_sni_warns|import hashlib import warnings import logging import unittest import ssl import socket from itertools import chain from mock import patch, Mock from urllib3 import add_stderr_logger, disable_warnings from urllib3.util.request import make_headers from urllib3.util.retry im... | null | null | null |
urllib3/urllib3 | train | 194 | 056045a062478e3c3afc2402ec81680d53490876 | train | test/with_dummyserver/test_https.py | train | urllib3/urllib3:test/with_dummyserver/test_https.py | 474 | 8 | self.assertEqual | test_set_ssl_version_to_sslv3 | import datetime
import logging
import ssl
import sys
import unittest
import warnings
import mock
from nose.plugins.skip import SkipTest
from dummyserver.testcase import (
HTTPSDummyServerTestCase, IPV6HTTPSDummyServerTestCase
)
from dummyserver.server import (DEFAULT_CA, DEFAULT_CA_BAD, DEFAULT_CERTS,
... | util.ssl_.resolve_ssl_version(ssl.PROTOCOL_SSLv3)) | added | 1967482b035543bc7e7644f3a4c789e768b899d6f0f088ce52cc49231559ffc6 | self.assertEqual|test_set_ssl_version_to_sslv3|import datetime import logging import ssl import sys import unittest import warnings import mock from nose.plugins.skip import SkipTest from dummyserver.testcase import ( HTTPSDummyServerTestCase, IPV6HTTPSDummyServerTestCase ) from dummyserver.server import (DEFAULT_CA, D... | null | null | null |
urllib3/urllib3 | train | 194 | 056045a062478e3c3afc2402ec81680d53490876 | train | test/with_dummyserver/test_https.py | train | urllib3/urllib3:test/with_dummyserver/test_https.py | 486 | 8 | self.assertEqual | test_ssl_version_as_short_string | import datetime
import logging
import ssl
import sys
import unittest
import warnings
import mock
from nose.plugins.skip import SkipTest
from dummyserver.testcase import (
HTTPSDummyServerTestCase, IPV6HTTPSDummyServerTestCase
)
from dummyserver.server import (DEFAULT_CA, DEFAULT_CA_BAD, DEFAULT_CERTS,
... | util.ssl_.resolve_ssl_version("SSLv3")) | added | 6ae526d436b3bf4f3b2659b61e66405893b25b528b2ac7e052c861bdc9960fb1 | self.assertEqual|test_ssl_version_as_short_string|import datetime import logging import ssl import sys import unittest import warnings import mock from nose.plugins.skip import SkipTest from dummyserver.testcase import ( HTTPSDummyServerTestCase, IPV6HTTPSDummyServerTestCase ) from dummyserver.server import (DEFAULT_CA... | null | null | null |
urllib3/urllib3 | train | 194 | 056045a062478e3c3afc2402ec81680d53490876 | train | test/with_dummyserver/test_https.py | train | urllib3/urllib3:test/with_dummyserver/test_https.py | 500 | 8 | self.assertEqual | test_set_cert_default_cert_required | import datetime
import logging
import ssl
import sys
import unittest
import warnings
import mock
from nose.plugins.skip import SkipTest
from dummyserver.testcase import (
HTTPSDummyServerTestCase, IPV6HTTPSDummyServerTestCase
)
from dummyserver.server import (DEFAULT_CA, DEFAULT_CA_BAD, DEFAULT_CERTS,
... | 'CERT_REQUIRED') | added | e795582c23e6ca530a7a38e188059597ef126f768caed41ec88a9bd60cc38044 | self.assertEqual|test_set_cert_default_cert_required|import datetime import logging import ssl import sys import unittest import warnings import mock from nose.plugins.skip import SkipTest from dummyserver.testcase import ( HTTPSDummyServerTestCase, IPV6HTTPSDummyServerTestCase ) from dummyserver.server import (DEFAULT... | null | null | null |
urllib3/urllib3 | train | 194 | 056045a062478e3c3afc2402ec81680d53490876 | train | test/with_dummyserver/test_https.py | train | urllib3/urllib3:test/with_dummyserver/test_https.py | 515 | 12 | self.assertTrue | test_warning_for_certs_without_a_san | import datetime
import logging
import ssl
import sys
import unittest
import warnings
import mock
from nose.plugins.skip import SkipTest
from dummyserver.testcase import (
HTTPSDummyServerTestCase, IPV6HTTPSDummyServerTestCase
)
from dummyserver.server import (DEFAULT_CA, DEFAULT_CA_BAD, DEFAULT_CERTS,
... | warn.called) | added | da6af5d3e2fcbe693115d94efeb704e62c99a2601de023b73d65316518cb1af7 | self.assertTrue|test_warning_for_certs_without_a_san|import datetime import logging import ssl import sys import unittest import warnings import mock from nose.plugins.skip import SkipTest from dummyserver.testcase import ( HTTPSDummyServerTestCase, IPV6HTTPSDummyServerTestCase ) from dummyserver.server import (DEFAULT... | null | null | null |
urllib3/urllib3 | train | 195 | 24b1647b2c5296aabc336c542a7d06548b90a0c2 | train | test/test_util.py | train | urllib3/urllib3:test/test_util.py | 137 | 12 | self.assertEqual | test_parse_url_normalization | import hashlib
import warnings
import logging
import unittest
import ssl
import socket
from itertools import chain
from mock import patch, Mock
from urllib3 import add_stderr_logger, disable_warnings
from urllib3.util.request import make_headers
from urllib3.util.retry import Retry
from urllib3.util.timeout import Ti... | expected_normalized_url) | modified | 7bffd1e649c0b09c65580ab3fe657b25dd697442cebf5dff97ddcd7c94c361d5 | self.assertEqual|test_parse_url_normalization|import hashlib import warnings import logging import unittest import ssl import socket from itertools import chain from mock import patch, Mock from urllib3 import add_stderr_logger, disable_warnings from urllib3.util.request import make_headers from urllib3.util.retry impo... | expected_normalized_url) | 136 | 12 |
urllib3/urllib3 | train | 195 | 24b1647b2c5296aabc336c542a7d06548b90a0c2 | train | test/test_util.py | train | urllib3/urllib3:test/test_util.py | 484 | 8 | assert_* | test_ssl_wrap_socket_with_no_sni | import hashlib
import warnings
import logging
import unittest
import ssl
import socket
from itertools import chain
from mock import patch, Mock
from urllib3 import add_stderr_logger, disable_warnings
from urllib3.util.request import make_headers
from urllib3.util.retry import Retry
from urllib3.util.timeout import Ti... | socket) | added | 771e8f4b7e51ff73f883aa948ea55d3a1fc53d0ed7ce7d3904b9b71bd21d284c | assert_*|test_ssl_wrap_socket_with_no_sni|import hashlib import warnings import logging import unittest import ssl import socket from itertools import chain from mock import patch, Mock from urllib3 import add_stderr_logger, disable_warnings from urllib3.util.request import make_headers from urllib3.util.retry import R... | null | null | null |
urllib3/urllib3 | train | 195 | 24b1647b2c5296aabc336c542a7d06548b90a0c2 | train | test/test_util.py | train | urllib3/urllib3:test/test_util.py | 499 | 8 | self.assertTrue | test_ssl_wrap_socket_with_no_sni_warns | import hashlib
import warnings
import logging
import unittest
import ssl
import socket
from itertools import chain
from mock import patch, Mock
from urllib3 import add_stderr_logger, disable_warnings
from urllib3.util.request import make_headers
from urllib3.util.retry import Retry
from urllib3.util.timeout import Ti... | SNIMissingWarning in warnings) | added | 9460360a8ba8b07c57cbe567447b275c21bd6747315835e79ed2892d1ae2b27c | self.assertTrue|test_ssl_wrap_socket_with_no_sni_warns|import hashlib import warnings import logging import unittest import ssl import socket from itertools import chain from mock import patch, Mock from urllib3 import add_stderr_logger, disable_warnings from urllib3.util.request import make_headers from urllib3.util.r... | null | null | null |
urllib3/urllib3 | train | 195 | 24b1647b2c5296aabc336c542a7d06548b90a0c2 | train | test/test_util.py | train | urllib3/urllib3:test/test_util.py | 523 | 16 | self.assertFalse | test_has_ipv6_enabled_but_fails | import hashlib
import warnings
import logging
import unittest
import ssl
import socket
from itertools import chain
from mock import patch, Mock
from urllib3 import add_stderr_logger, disable_warnings
from urllib3.util.request import make_headers
from urllib3.util.retry import Retry
from urllib3.util.timeout import Ti... | _has_ipv6('::1')) | added | c31c5685307fe495ba0a942b3f43185d5963c59d154f42e24573190bacad2089 | self.assertFalse|test_has_ipv6_enabled_but_fails|import hashlib import warnings import logging import unittest import ssl import socket from itertools import chain from mock import patch, Mock from urllib3 import add_stderr_logger, disable_warnings from urllib3.util.request import make_headers from urllib3.util.retry i... | null | null | null |
urllib3/urllib3 | train | 195 | 24b1647b2c5296aabc336c542a7d06548b90a0c2 | train | test/with_dummyserver/test_https.py | train | urllib3/urllib3:test/with_dummyserver/test_https.py | 475 | 8 | self.assertRaises | test_discards_connection_on_sslerror | import datetime
import logging
import ssl
import sys
import unittest
import warnings
import mock
from nose.plugins.skip import SkipTest
from dummyserver.testcase import (
HTTPSDummyServerTestCase, IPV6HTTPSDummyServerTestCase
)
from dummyserver.server import (DEFAULT_CA, DEFAULT_CA_BAD, DEFAULT_CERTS,
... | SSLError) | added | c5bb33987f8b64c2086943b5eea7b2289907426af45694282bc6d0b539fd69de | self.assertRaises|test_discards_connection_on_sslerror|import datetime import logging import ssl import sys import unittest import warnings import mock from nose.plugins.skip import SkipTest from dummyserver.testcase import ( HTTPSDummyServerTestCase, IPV6HTTPSDummyServerTestCase ) from dummyserver.server import (DEFAU... | null | null | null |
urllib3/urllib3 | train | 195 | 24b1647b2c5296aabc336c542a7d06548b90a0c2 | train | test/with_dummyserver/test_https.py | train | urllib3/urllib3:test/with_dummyserver/test_https.py | 482 | 8 | self.assertEqual | test_set_cert_default_cert_required | import datetime
import logging
import ssl
import sys
import unittest
import warnings
import mock
from nose.plugins.skip import SkipTest
from dummyserver.testcase import (
HTTPSDummyServerTestCase, IPV6HTTPSDummyServerTestCase
)
from dummyserver.server import (DEFAULT_CA, DEFAULT_CA_BAD, DEFAULT_CERTS,
... | 'CERT_REQUIRED') | added | 5eb51e791214e5efa5cd72ceffd253a18e18cf78690957040b0d86fb55b8a71e | self.assertEqual|test_set_cert_default_cert_required|import datetime import logging import ssl import sys import unittest import warnings import mock from nose.plugins.skip import SkipTest from dummyserver.testcase import ( HTTPSDummyServerTestCase, IPV6HTTPSDummyServerTestCase ) from dummyserver.server import (DEFAULT... | null | null | null |
urllib3/urllib3 | train | 195 | 24b1647b2c5296aabc336c542a7d06548b90a0c2 | train | test/with_dummyserver/test_https.py | train | urllib3/urllib3:test/with_dummyserver/test_https.py | 497 | 12 | self.assertTrue | test_warning_for_certs_without_a_san | import datetime
import logging
import ssl
import sys
import unittest
import warnings
import mock
from nose.plugins.skip import SkipTest
from dummyserver.testcase import (
HTTPSDummyServerTestCase, IPV6HTTPSDummyServerTestCase
)
from dummyserver.server import (DEFAULT_CA, DEFAULT_CA_BAD, DEFAULT_CERTS,
... | warn.called) | added | f365b2494a7a8b26d5879283e7ffd7ed3b0be4bb181f20c4aae96070b47f19ae | self.assertTrue|test_warning_for_certs_without_a_san|import datetime import logging import ssl import sys import unittest import warnings import mock from nose.plugins.skip import SkipTest from dummyserver.testcase import ( HTTPSDummyServerTestCase, IPV6HTTPSDummyServerTestCase ) from dummyserver.server import (DEFAULT... | null | null | null |
urllib3/urllib3 | train | 196 | 1154d6771e4892078bd1fe3f8d0590342a706d5d | train | test/test_fields.py | train | urllib3/urllib3:test/test_fields.py | 42 | 8 | self.assertEqual | test_make_multipart_empty_filename | import unittest
from urllib3.fields import guess_content_type, RequestField
from urllib3.packages.six import u, PY3
from . import onlyPy2
class TestRequestField(unittest.TestCase):
def test_guess_content_type(self):
self.assertTrue(guess_content_type('image.jpg') in
['image/jpeg'... | 'Content-Disposition: form-data; name="somename"; filename=""\r\n' 'Content-Type: application/octet-stream\r\n' '\r\n') | added | 690a0a1b5f72503e7697cd338e1a553ef5cd161ae9c9209b30766918197ec286 | self.assertEqual|test_make_multipart_empty_filename|import unittest from urllib3.fields import guess_content_type, RequestField from urllib3.packages.six import u, PY3 from . import onlyPy2 class TestRequestField(unittest.TestCase): def test_guess_content_type(self): self.assertTrue(guess_content_type('image.jpg') in [... | null | null | null |
urllib3/urllib3 | train | 196 | 1154d6771e4892078bd1fe3f8d0590342a706d5d | train | test/test_fields.py | train | urllib3/urllib3:test/test_fields.py | 51 | 8 | self.assertTrue | test_render_parts | import unittest
from urllib3.fields import guess_content_type, RequestField
from urllib3.packages.six import u, PY3
from . import onlyPy2
class TestRequestField(unittest.TestCase):
def test_guess_content_type(self):
self.assertTrue(guess_content_type('image.jpg') in
['image/jpeg'... | 'name="value"' in parts) | added | aa8e628630308e93f315b435b3176957c7d3ea65569f7e647b19b8f0d6e8b9e5 | self.assertTrue|test_render_parts|import unittest from urllib3.fields import guess_content_type, RequestField from urllib3.packages.six import u, PY3 from . import onlyPy2 class TestRequestField(unittest.TestCase): def test_guess_content_type(self): self.assertTrue(guess_content_type('image.jpg') in ['image/jpeg', 'ima... | null | null | null |
urllib3/urllib3 | train | 196 | 1154d6771e4892078bd1fe3f8d0590342a706d5d | train | test/test_fields.py | train | urllib3/urllib3:test/test_fields.py | 59 | 8 | self.assertEqual | test_render_part | import unittest
from urllib3.fields import guess_content_type, RequestField
from urllib3.packages.six import u, PY3
from . import onlyPy2
class TestRequestField(unittest.TestCase):
def test_guess_content_type(self):
self.assertTrue(guess_content_type('image.jpg') in
['image/jpeg'... | "filename*=utf-8''n%C3%A4me") | added | a6750922fdb3ed7f525165cb9db1fdd51037cee2a0d7a5dbb6f27deb50b9f6c7 | self.assertEqual|test_render_part|import unittest from urllib3.fields import guess_content_type, RequestField from urllib3.packages.six import u, PY3 from . import onlyPy2 class TestRequestField(unittest.TestCase): def test_guess_content_type(self): self.assertTrue(guess_content_type('image.jpg') in ['image/jpeg', 'ima... | null | null | null |
urllib3/urllib3 | train | 196 | 1154d6771e4892078bd1fe3f8d0590342a706d5d | train | test/test_fields.py | train | urllib3/urllib3:test/test_fields.py | 65 | 8 | self.assertEqual | test_render_unicode_bytes_py2 | import unittest
from urllib3.fields import guess_content_type, RequestField
from urllib3.packages.six import u, PY3
from . import onlyPy2
class TestRequestField(unittest.TestCase):
def test_guess_content_type(self):
self.assertTrue(guess_content_type('image.jpg') in
['image/jpeg'... | "filename*=utf-8''n%C3%A4me") | added | a5ae4b9aeec0285c163b188392287c7ea2d7e83fd96b0feed74567cae344c382 | self.assertEqual|test_render_unicode_bytes_py2|import unittest from urllib3.fields import guess_content_type, RequestField from urllib3.packages.six import u, PY3 from . import onlyPy2 class TestRequestField(unittest.TestCase): def test_guess_content_type(self): self.assertTrue(guess_content_type('image.jpg') in ['imag... | null | null | null |
urllib3/urllib3 | train | 198 | ba92f65f2cf7ff65eb03ffc42b7ea065da8152ca | train | test/test_selectors.py | train | urllib3/urllib3:test/test_selectors.py | 170 | 8 | self.assertEqual | test_wait_for_non_list_iterable | from __future__ import with_statement
import errno
import os
import psutil
import signal
import socket
import sys
import time
import threading
try: # Python 2.6 unittest module doesn't have skip decorators.
from unittest import skip, skipIf, skipUnless
import unittest
except ImportError:
from unittest2 im... | wait_for_read(iterable, timeout=SHORT_SELECT)) | added | 3579902c90d1cdbb6c031aa1f1ce44b6ec20a928f1432578375e5e3ab373cd7b | self.assertEqual|test_wait_for_non_list_iterable|from __future__ import with_statement import errno import os import psutil import signal import socket import sys import time import threading try: # Python 2.6 unittest module doesn't have skip decorators. from unittest import skip, skipIf, skipUnless import unittest ex... | null | null | null |
urllib3/urllib3 | train | 198 | ba92f65f2cf7ff65eb03ffc42b7ea065da8152ca | train | test/test_selectors.py | train | urllib3/urllib3:test/test_selectors.py | 344 | 8 | self.assertEqual | test_unregister_after_fd_close | from __future__ import with_statement
import errno
import os
import psutil
import signal
import socket
import sys
import time
import threading
try: # Python 2.6 unittest module doesn't have skip decorators.
from unittest import skip, skipIf, skipUnless
import unittest
except ImportError:
from unittest2 im... | len(s.get_map())) | added | 1686a5c836f023f086ad416f16c51a7530c76f2f1139e6ac1b764937b2d98137 | self.assertEqual|test_unregister_after_fd_close|from __future__ import with_statement import errno import os import psutil import signal import socket import sys import time import threading try: # Python 2.6 unittest module doesn't have skip decorators. from unittest import skip, skipIf, skipUnless import unittest exc... | null | null | null |
urllib3/urllib3 | train | 198 | ba92f65f2cf7ff65eb03ffc42b7ea065da8152ca | train | test/test_selectors.py | train | urllib3/urllib3:test/test_selectors.py | 406 | 8 | self.assertEqual | test_empty_select | from __future__ import with_statement
import errno
import os
import psutil
import signal
import socket
import sys
import time
import threading
try: # Python 2.6 unittest module doesn't have skip decorators.
from unittest import skip, skipIf, skipUnless
import unittest
except ImportError:
from unittest2 im... | s.select(timeout=SHORT_SELECT)) | added | 0e1bb32647faa786d05f1f0250c6e23056f799b4292b6798809b374d5edd968c | self.assertEqual|test_empty_select|from __future__ import with_statement import errno import os import psutil import signal import socket import sys import time import threading try: # Python 2.6 unittest module doesn't have skip decorators. from unittest import skip, skipIf, skipUnless import unittest except ImportErr... | null | null | null |
urllib3/urllib3 | train | 198 | ba92f65f2cf7ff65eb03ffc42b7ea065da8152ca | train | test/test_selectors.py | train | urllib3/urllib3:test/test_selectors.py | 519 | 12 | self.assertEqual | test_select_interrupt_no_event | from __future__ import with_statement
import errno
import os
import psutil
import signal
import socket
import sys
import time
import threading
try: # Python 2.6 unittest module doesn't have skip decorators.
from unittest import skip, skipIf, skipUnless
import unittest
except ImportError:
from unittest2 im... | s.select(LONG_SELECT)) | added | 82d5f77499b065c7f76d883c00d66e6f86e010f436b5480f6f4b6ca60ff4af75 | self.assertEqual|test_select_interrupt_no_event|from __future__ import with_statement import errno import os import psutil import signal import socket import sys import time import threading try: # Python 2.6 unittest module doesn't have skip decorators. from unittest import skip, skipIf, skipUnless import unittest exc... | null | null | null |
urllib3/urllib3 | train | 199 | 602d591e306faa5ad971e544e85eab33b04fcb28 | train | test/test_connection.py | test | urllib3/urllib3:test/test_connection.py | 25 | 8 | self.assertRaises | test_match_hostname_no_cert | import datetime
import sys
if sys.version_info >= (2, 7):
import unittest
else:
import unittest2 as unittest
import mock
from urllib3.connection import (
CertificateError,
VerifiedHTTPSConnection,
_match_hostname,
RECENT_DATE
)
class TestConnection(unittest.TestCase):
"""
Tests in th... | ValueError) | added | cfb2d35656a6d2f36b6bc7f0ca23f0f62fae9fc1e604f9f8251b9df973a87a18 | self.assertRaises|test_match_hostname_no_cert|import datetime import sys if sys.version_info >= (2, 7): import unittest else: import unittest2 as unittest import mock from urllib3.connection import ( CertificateError, VerifiedHTTPSConnection, _match_hostname, RECENT_DATE ) class TestConnection(unittest.TestCase): """ T... | null | null | null |
urllib3/urllib3 | train | 199 | 602d591e306faa5ad971e544e85eab33b04fcb28 | train | test/test_connection.py | test | urllib3/urllib3:test/test_connection.py | 30 | 8 | self.assertRaises | test_match_hostname_empty_cert | import datetime
import sys
if sys.version_info >= (2, 7):
import unittest
else:
import unittest2 as unittest
import mock
from urllib3.connection import (
CertificateError,
VerifiedHTTPSConnection,
_match_hostname,
RECENT_DATE
)
class TestConnection(unittest.TestCase):
"""
Tests in th... | ValueError) | added | 4f1354916019fe7ec2c2ebacf217f63590810cf4309bac64e53bd6724ae85d64 | self.assertRaises|test_match_hostname_empty_cert|import datetime import sys if sys.version_info >= (2, 7): import unittest else: import unittest2 as unittest import mock from urllib3.connection import ( CertificateError, VerifiedHTTPSConnection, _match_hostname, RECENT_DATE ) class TestConnection(unittest.TestCase): ""... | null | null | null |
urllib3/urllib3 | train | 199 | 602d591e306faa5ad971e544e85eab33b04fcb28 | train | test/test_connection.py | test | urllib3/urllib3:test/test_connection.py | 44 | 12 | self.assertEqual | test_match_hostname_mismatch | import datetime
import sys
if sys.version_info >= (2, 7):
import unittest
else:
import unittest2 as unittest
import mock
from urllib3.connection import (
CertificateError,
VerifiedHTTPSConnection,
_match_hostname,
RECENT_DATE
)
class TestConnection(unittest.TestCase):
"""
Tests in th... | "hostname 'bar' doesn't match 'foo'") | added | 0d2ffcdf4a8e8be02359a2784c7a0d3b84054419857d2d6b2cac81d148e2f466 | self.assertEqual|test_match_hostname_mismatch|import datetime import sys if sys.version_info >= (2, 7): import unittest else: import unittest2 as unittest import mock from urllib3.connection import ( CertificateError, VerifiedHTTPSConnection, _match_hostname, RECENT_DATE ) class TestConnection(unittest.TestCase): """ T... | null | null | null |
urllib3/urllib3 | train | 199 | 602d591e306faa5ad971e544e85eab33b04fcb28 | train | test/test_connection.py | test | urllib3/urllib3:test/test_connection.py | 58 | 8 | self.assertGreater | test_recent_date | import datetime
import sys
if sys.version_info >= (2, 7):
import unittest
else:
import unittest2 as unittest
import mock
from urllib3.connection import (
CertificateError,
VerifiedHTTPSConnection,
_match_hostname,
RECENT_DATE
)
class TestConnection(unittest.TestCase):
"""
Tests in th... | (datetime.datetime.today() - two_years).date()) | added | f147bbf98147d669eb352cac68737443145d9a1e1815203bc68e803d185c2ca4 | self.assertGreater|test_recent_date|import datetime import sys if sys.version_info >= (2, 7): import unittest else: import unittest2 as unittest import mock from urllib3.connection import ( CertificateError, VerifiedHTTPSConnection, _match_hostname, RECENT_DATE ) class TestConnection(unittest.TestCase): """ Tests in th... | null | null | null |
urllib3/urllib3 | train | 200 | 92e6f962ae05f33fc471a7cb37c954b110a63d0f | train | test/test_connectionpool.py | train | urllib3/urllib3:test/test_connectionpool.py | 285 | 8 | self.assertEqual | test_absolute_url | from __future__ import absolute_import
import unittest
from urllib3.connectionpool import (
connection_from_url,
HTTPConnection,
HTTPConnectionPool,
HTTPSConnectionPool,
)
from urllib3.response import httplib, HTTPResponse
from urllib3.util.timeout import Timeout
from urllib3.packages.six.moves.http_c... | c._absolute_url('path?query=foo')) | added | f3246a754ead6d7b097f52e5f27d1a72ad95a6daa08f09a1676868e9d48c150a | self.assertEqual|test_absolute_url|from __future__ import absolute_import import unittest from urllib3.connectionpool import ( connection_from_url, HTTPConnection, HTTPConnectionPool, HTTPSConnectionPool, ) from urllib3.response import httplib, HTTPResponse from urllib3.util.timeout import Timeout from urllib3.packages... | null | null | null |
urllib3/urllib3 | train | 200 | 92e6f962ae05f33fc471a7cb37c954b110a63d0f | train | test/test_connectionpool.py | train | urllib3/urllib3:test/test_connectionpool.py | 318 | 8 | self.assertEqual | test_cleanup_on_extreme_connection_error | from __future__ import absolute_import
import unittest
from urllib3.connectionpool import (
connection_from_url,
HTTPConnection,
HTTPConnectionPool,
HTTPSConnectionPool,
)
from urllib3.response import httplib, HTTPResponse
from urllib3.util.timeout import Timeout
from urllib3.packages.six.moves.http_c... | new_pool_size) | added | e8fa93831d1afc372e9bab6c679538691e085f114481bc2918162d89fa085688 | self.assertEqual|test_cleanup_on_extreme_connection_error|from __future__ import absolute_import import unittest from urllib3.connectionpool import ( connection_from_url, HTTPConnection, HTTPConnectionPool, HTTPSConnectionPool, ) from urllib3.response import httplib, HTTPResponse from urllib3.util.timeout import Timeou... | null | null | null |
urllib3/urllib3 | train | 200 | 92e6f962ae05f33fc471a7cb37c954b110a63d0f | train | test/test_connectionpool.py | train | urllib3/urllib3:test/test_connectionpool.py | 365 | 12 | self.assertTrue | _test | from __future__ import absolute_import
import unittest
from urllib3.connectionpool import (
connection_from_url,
HTTPConnection,
HTTPConnectionPool,
HTTPSConnectionPool,
)
from urllib3.response import httplib, HTTPResponse
from urllib3.util.timeout import Timeout
from urllib3.packages.six.moves.http_c... | response.connection is None) | added | c1c76c90d1f7124ffc0e75f157bd86acb7d92b080e754ff5085acc7e408e2069 | self.assertTrue|_test|from __future__ import absolute_import import unittest from urllib3.connectionpool import ( connection_from_url, HTTPConnection, HTTPConnectionPool, HTTPSConnectionPool, ) from urllib3.response import httplib, HTTPResponse from urllib3.util.timeout import Timeout from urllib3.packages.six.moves.ht... | null | null | null |
urllib3/urllib3 | train | 200 | 92e6f962ae05f33fc471a7cb37c954b110a63d0f | train | test/test_connectionpool.py | train | urllib3/urllib3:test/test_connectionpool.py | 390 | 8 | self.assertTrue | test_custom_http_response_class | from __future__ import absolute_import
import unittest
from urllib3.connectionpool import (
connection_from_url,
HTTPConnection,
HTTPConnectionPool,
HTTPSConnectionPool,
)
from urllib3.response import httplib, HTTPResponse
from urllib3.util.timeout import Timeout
from urllib3.packages.six.moves.http_c... | isinstance(response, CustomHTTPResponse)) | added | 1675d3a51f5214173cf3df3f8fbffdb2869a0aed7985ba2187cfcf91a0bbd5a9 | self.assertTrue|test_custom_http_response_class|from __future__ import absolute_import import unittest from urllib3.connectionpool import ( connection_from_url, HTTPConnection, HTTPConnectionPool, HTTPSConnectionPool, ) from urllib3.response import httplib, HTTPResponse from urllib3.util.timeout import Timeout from url... | null | null | null |
urllib3/urllib3 | train | 201 | 78e8b5b01680760576f27f42cd96964c4bb3189b | train | test/contrib/test_pyopenssl_dependencies.py | train | urllib3/urllib3:test/contrib/test_pyopenssl_dependencies.py | 29 | 16 | self.assertRaises | test_inject_validate_fail | # -*- coding: utf-8 -*-
import unittest
from nose.plugins.skip import SkipTest
try:
from urllib3.contrib.pyopenssl import (inject_into_urllib3,
extract_from_urllib3)
except ImportError as e:
raise SkipTest('Could not import PyOpenSSL: %r' % e)
from mock import patch... | ImportError) | added | 848e435edfefded08cea8a993bb00b43beb5889e91ef41b6aa337c5b0d7bfaf9 | self.assertRaises|test_inject_validate_fail|# -*- coding: utf-8 -*- import unittest from nose.plugins.skip import SkipTest try: from urllib3.contrib.pyopenssl import (inject_into_urllib3, extract_from_urllib3) except ImportError as e: raise SkipTest('Could not import PyOpenSSL: %r' % e) from mock import patch class Tes... | null | null | null |
urllib3/urllib3 | train | 202 | 7002c1347c677b2743244bf36bd05aa3625f57f1 | train | test/test_util.py | train | urllib3/urllib3:test/test_util.py | 389 | 8 | self.assertEqual | test_timeout | import hashlib
import warnings
import logging
import io
import unittest
import ssl
import socket
from itertools import chain
from mock import patch, Mock
from urllib3 import add_stderr_logger, disable_warnings
from urllib3.util.request import make_headers, rewind_body, _FAILEDTELL
from urllib3.util.retry import Retry... | Timeout.DEFAULT_TIMEOUT) | added | 34f48a70b7aa81ac0d72a6df4d5e1f27d36fbef500bdf332abcdaf43b28fe684 | self.assertEqual|test_timeout|import hashlib import warnings import logging import io import unittest import ssl import socket from itertools import chain from mock import patch, Mock from urllib3 import add_stderr_logger, disable_warnings from urllib3.util.request import make_headers, rewind_body, _FAILEDTELL from url... | null | null | null |
urllib3/urllib3 | train | 202 | 7002c1347c677b2743244bf36bd05aa3625f57f1 | train | test/test_util.py | train | urllib3/urllib3:test/test_util.py | 455 | 8 | self.assertTrue | test_is_fp_closed_object_supports_closed | import hashlib
import warnings
import logging
import io
import unittest
import ssl
import socket
from itertools import chain
from mock import patch, Mock
from urllib3 import add_stderr_logger, disable_warnings
from urllib3.util.request import make_headers, rewind_body, _FAILEDTELL
from urllib3.util.retry import Retry... | is_fp_closed(ClosedFile())) | added | ad9e5654ac6103de0b6afea4de7e76a0e90ec90ac8249d9e4d58bd01effd69cd | self.assertTrue|test_is_fp_closed_object_supports_closed|import hashlib import warnings import logging import io import unittest import ssl import socket from itertools import chain from mock import patch, Mock from urllib3 import add_stderr_logger, disable_warnings from urllib3.util.request import make_headers, rewind... | null | null | null |
urllib3/urllib3 | train | 202 | 7002c1347c677b2743244bf36bd05aa3625f57f1 | train | test/test_util.py | train | urllib3/urllib3:test/test_util.py | 567 | 16 | self.assertTrue | test_has_ipv6_enabled_and_working | import hashlib
import warnings
import logging
import io
import unittest
import ssl
import socket
from itertools import chain
from mock import patch, Mock
from urllib3 import add_stderr_logger, disable_warnings
from urllib3.util.request import make_headers, rewind_body, _FAILEDTELL
from urllib3.util.retry import Retry... | _has_ipv6('::1')) | added | d559ef87bbd41af21b4b2a08175535aaff2e29d7f716f36ecd51f84e221cf940 | self.assertTrue|test_has_ipv6_enabled_and_working|import hashlib import warnings import logging import io import unittest import ssl import socket from itertools import chain from mock import patch, Mock from urllib3 import add_stderr_logger, disable_warnings from urllib3.util.request import make_headers, rewind_body, ... | null | null | null |
urllib3/urllib3 | train | 202 | 7002c1347c677b2743244bf36bd05aa3625f57f1 | train | test/test_util.py | train | urllib3/urllib3:test/test_util.py | 587 | 12 | self.assertRaises | test_parse_retry_after | import hashlib
import warnings
import logging
import io
import unittest
import ssl
import socket
from itertools import chain
from mock import patch, Mock
from urllib3 import add_stderr_logger, disable_warnings
from urllib3.util.request import make_headers, rewind_body, _FAILEDTELL
from urllib3.util.retry import Retry... | InvalidHeader) | added | 5be216e021cd97fead0eb2798c787abe8e039e6566d0db545e81e8ec8c78d58e | self.assertRaises|test_parse_retry_after|import hashlib import warnings import logging import io import unittest import ssl import socket from itertools import chain from mock import patch, Mock from urllib3 import add_stderr_logger, disable_warnings from urllib3.util.request import make_headers, rewind_body, _FAILEDTE... | null | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.