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 | 307 | 728d9244665ef5b03103cb74d7b409ebe4f23b43 | train | test/test_retry.py | train | urllib3/urllib3:test/test_retry.py | 273 | 8 | assert | test_retry_default_remove_headers_on_redirect | import datetime
import mock
import pytest
import time
from urllib3.response import HTTPResponse
from urllib3.packages import six
from urllib3.packages.six.moves import xrange
from urllib3.util.retry import Retry, RequestHistory
from urllib3.exceptions import (
ConnectTimeoutError,
InvalidHeader,
MaxRetryEr... | ["authorization"] | added | 42e5c2a4bf518e254b266ce0f08445f14b6ccbf0601cb8d4d9673417de980dce | assert|test_retry_default_remove_headers_on_redirect|import datetime import mock import pytest import time from urllib3.response import HTTPResponse from urllib3.packages import six from urllib3.packages.six.moves import xrange from urllib3.util.retry import Retry, RequestHistory from urllib3.exceptions import ( Connec... | null | null | null |
urllib3/urllib3 | train | 307 | 728d9244665ef5b03103cb74d7b409ebe4f23b43 | train | test/test_retry.py | train | urllib3/urllib3:test/test_retry.py | 278 | 8 | assert | test_retry_set_remove_headers_on_redirect | import datetime
import mock
import pytest
import time
from urllib3.response import HTTPResponse
from urllib3.packages import six
from urllib3.packages.six.moves import xrange
from urllib3.util.retry import Retry, RequestHistory
from urllib3.exceptions import (
ConnectTimeoutError,
InvalidHeader,
MaxRetryEr... | ["x-api-secret"] | added | 1bcbb09b4de225c3b81e5834cb8f0db00c7ab561195c3027b4231ab1e8fb7399 | assert|test_retry_set_remove_headers_on_redirect|import datetime import mock import pytest import time from urllib3.response import HTTPResponse from urllib3.packages import six from urllib3.packages.six.moves import xrange from urllib3.util.retry import Retry, RequestHistory from urllib3.exceptions import ( ConnectTim... | null | null | null |
urllib3/urllib3 | train | 307 | 728d9244665ef5b03103cb74d7b409ebe4f23b43 | train | test/test_util.py | train | urllib3/urllib3:test/test_util.py | 285 | 8 | assert | test_unparse_url | # coding: utf-8
import hashlib
import warnings
import logging
import io
import ssl
import socket
from itertools import chain
from mock import patch, Mock
import pytest
from urllib3 import add_stderr_logger, disable_warnings
from urllib3.util.request import make_headers, rewind_body, _FAILEDTELL
from urllib3.util.resp... | expected_url.url | modified | fa28aedff14207ca7967a66e39863987052a7e085b92814d64c1c6f17ffde855 | assert|test_unparse_url|# coding: utf-8 import hashlib import warnings import logging import io import ssl import socket from itertools import chain from mock import patch, Mock import pytest from urllib3 import add_stderr_logger, disable_warnings from urllib3.util.request import make_headers, rewind_body, _FAILEDTELL ... | expected_url.url | 287 | 8 |
urllib3/urllib3 | train | 307 | 728d9244665ef5b03103cb74d7b409ebe4f23b43 | train | test/test_util.py | train | urllib3/urllib3:test/test_util.py | 342 | 8 | assert | test_netloc | # coding: utf-8
import hashlib
import warnings
import logging
import io
import ssl
import socket
from itertools import chain
from mock import patch, Mock
import pytest
from urllib3 import add_stderr_logger, disable_warnings
from urllib3.util.request import make_headers, rewind_body, _FAILEDTELL
from urllib3.util.resp... | expected_netloc | modified | b54b0324c087a8872967582d1250182793b43fbf4f0c9f269285be3e416c4ba6 | assert|test_netloc|# coding: utf-8 import hashlib import warnings import logging import io import ssl import socket from itertools import chain from mock import patch, Mock import pytest from urllib3 import add_stderr_logger, disable_warnings from urllib3.util.request import make_headers, rewind_body, _FAILEDTELL from ... | expected_netloc | 344 | 8 |
urllib3/urllib3 | train | 307 | 728d9244665ef5b03103cb74d7b409ebe4f23b43 | train | test/test_util.py | train | urllib3/urllib3:test/test_util.py | 504 | 13 | pytest.raises | test_rewind_body_failed_seek | # coding: utf-8
import hashlib
import warnings
import logging
import io
import ssl
import socket
from itertools import chain
from mock import patch, Mock
import pytest
from urllib3 import add_stderr_logger, disable_warnings
from urllib3.util.request import make_headers, rewind_body, _FAILEDTELL
from urllib3.util.resp... | UnrewindableBodyError) | modified | 0046d934b3e64ff130feeddd419a11402ec7bdf0564995af8966193d30ddfc98 | pytest.raises|test_rewind_body_failed_seek|# coding: utf-8 import hashlib import warnings import logging import io import ssl import socket from itertools import chain from mock import patch, Mock import pytest from urllib3 import add_stderr_logger, disable_warnings from urllib3.util.request import make_headers, rewind... | UnrewindableBodyError) | 506 | 13 |
urllib3/urllib3 | train | 307 | 728d9244665ef5b03103cb74d7b409ebe4f23b43 | train | test/test_util.py | train | urllib3/urllib3:test/test_util.py | 777 | 12 | assert | test_ip_family_ipv6_enabled | # coding: utf-8
import hashlib
import warnings
import logging
import io
import ssl
import socket
from itertools import chain
from mock import patch, Mock
import pytest
from urllib3 import add_stderr_logger, disable_warnings
from urllib3.util.request import make_headers, rewind_body, _FAILEDTELL
from urllib3.util.resp... | socket.AF_UNSPEC | modified | 77427e8fec8a0ce7baa64691cf8f2045fd11115cd97a72b2eb4efd9a07e678bb | assert|test_ip_family_ipv6_enabled|# coding: utf-8 import hashlib import warnings import logging import io import ssl import socket from itertools import chain from mock import patch, Mock import pytest from urllib3 import add_stderr_logger, disable_warnings from urllib3.util.request import make_headers, rewind_body, _... | socket.AF_UNSPEC | 779 | 12 |
urllib3/urllib3 | train | 308 | 25add2a0bac43823a4a5ef9217578a2cf5bcfc69 | train | test/contrib/test_socks.py | train | urllib3/urllib3:test/contrib/test_socks.py | 629 | 12 | assert | test_socks4_with_username | import threading
import socket
from urllib3.contrib import socks
from urllib3.exceptions import ConnectTimeoutError, NewConnectionError
from dummyserver.server import DEFAULT_CERTS, DEFAULT_CA
from dummyserver.testcase import IPV4SocketDummyServerTestCase
import pytest
try:
import ssl
from urllib3.util impo... | "16.17.18.19" | added | 8482cdccba167d449cd62292cbc62cc557a2a369ed1183128f4c6ad27a1248f9 | assert|test_socks4_with_username|import threading import socket from urllib3.contrib import socks from urllib3.exceptions import ConnectTimeoutError, NewConnectionError from dummyserver.server import DEFAULT_CERTS, DEFAULT_CA from dummyserver.testcase import IPV4SocketDummyServerTestCase import pytest try: import ssl f... | null | null | null |
urllib3/urllib3 | train | 308 | 25add2a0bac43823a4a5ef9217578a2cf5bcfc69 | train | test/with_dummyserver/test_chunked_transfer.py | train | urllib3/urllib3:test/with_dummyserver/test_chunked_transfer.py | 40 | 16 | assert | test_chunks | # -*- coding: utf-8 -*-
from urllib3 import HTTPConnectionPool
from dummyserver.testcase import SocketDummyServerTestCase
class TestChunkedTransfer(SocketDummyServerTestCase):
def start_chunked_handler(self):
self.buffer = b""
def socket_handler(listener):
sock = listener.accept()[0]... | chunk.encode("utf-8") | modified | 59a268ac70ebce1809c31704c68e31c10f9a4a05cb0f77560dd52f520e23090e | assert|test_chunks|# -*- coding: utf-8 -*- from urllib3 import HTTPConnectionPool from dummyserver.testcase import SocketDummyServerTestCase class TestChunkedTransfer(SocketDummyServerTestCase): def start_chunked_handler(self): self.buffer = b"" def socket_handler(listener): sock = listener.accept()[0] while not self.b... | chunk.encode("utf-8") | 41 | 12 |
urllib3/urllib3 | train | 308 | 25add2a0bac43823a4a5ef9217578a2cf5bcfc69 | train | test/with_dummyserver/test_connectionpool.py | train | urllib3/urllib3:test/with_dummyserver/test_connectionpool.py | 380 | 16 | assert | test_defaults_are_applied | import io
import logging
import socket
import sys
import unittest
import time
import warnings
import pytest
import mock
from .. import TARPIT_HOST, VALID_SOURCE_ADDRESSES, INVALID_SOURCE_ADDRESSES
from ..port_helpers import find_unused_port
from urllib3 import encode_multipart_formdata, HTTPConnectionPool
from urllib... | using_keepalive | added | e7a45280ecc8b1d74c400f1b6154aff83d3edacf508d0f3762c08e0a34c7d431 | assert|test_defaults_are_applied|import io import logging import socket import sys import unittest import time import warnings import pytest import mock from .. import TARPIT_HOST, VALID_SOURCE_ADDRESSES, INVALID_SOURCE_ADDRESSES from ..port_helpers import find_unused_port from urllib3 import encode_multipart_formdata,... | null | null | null |
urllib3/urllib3 | train | 308 | 25add2a0bac43823a4a5ef9217578a2cf5bcfc69 | train | test/with_dummyserver/test_https.py | train | urllib3/urllib3:test/with_dummyserver/test_https.py | 472 | 21 | pytest.raises | _test_request | import datetime
import json
import logging
import ssl
import sys
import unittest
import warnings
import mock
import pytest
from dummyserver.testcase import HTTPSDummyServerTestCase, IPV6HTTPSDummyServerTestCase
from dummyserver.server import (
DEFAULT_CA,
DEFAULT_CA_BAD,
DEFAULT_CERTS,
DEFAULT_CLIENT_... | MaxRetryError) | added | e039d68634f27cbf04d6366be345b9ccae39ac2a0ef97ee080a228ba3c79b49c | pytest.raises|_test_request|import datetime import json import logging import ssl import sys import unittest import warnings import mock import pytest from dummyserver.testcase import HTTPSDummyServerTestCase, IPV6HTTPSDummyServerTestCase from dummyserver.server import ( DEFAULT_CA, DEFAULT_CA_BAD, DEFAULT_CERTS, DEFAU... | null | null | null |
urllib3/urllib3 | train | 308 | 25add2a0bac43823a4a5ef9217578a2cf5bcfc69 | train | test/with_dummyserver/test_poolmanager.py | train | urllib3/urllib3:test/with_dummyserver/test_poolmanager.py | 37 | 12 | assert | test_redirect | import unittest
import json
import pytest
from dummyserver.server import HAS_IPV6
from dummyserver.testcase import HTTPDummyServerTestCase, IPv6HTTPDummyServerTestCase
from urllib3.poolmanager import PoolManager
from urllib3.connectionpool import port_by_scheme
from urllib3.exceptions import MaxRetryError
from urllib... | b"Dummy server!" | modified | eb08c791865d093724295a06b8c847c645e5128d7a14902b25002026473266da | assert|test_redirect|import unittest import json import pytest from dummyserver.server import HAS_IPV6 from dummyserver.testcase import HTTPDummyServerTestCase, IPv6HTTPDummyServerTestCase from urllib3.poolmanager import PoolManager from urllib3.connectionpool import port_by_scheme from urllib3.exceptions import MaxRet... | b"Dummy server!" | 39 | 8 |
urllib3/urllib3 | train | 308 | 25add2a0bac43823a4a5ef9217578a2cf5bcfc69 | train | test/with_dummyserver/test_poolmanager.py | train | urllib3/urllib3:test/with_dummyserver/test_poolmanager.py | 301 | 12 | assert | test_missing_port | import unittest
import json
import pytest
from dummyserver.server import HAS_IPV6
from dummyserver.testcase import HTTPDummyServerTestCase, IPv6HTTPDummyServerTestCase
from urllib3.poolmanager import PoolManager
from urllib3.connectionpool import port_by_scheme
from urllib3.exceptions import MaxRetryError
from urllib... | b"Dummy server!" | modified | 64efd53303a5b0d2486fce142aa5ac9635576633d19c2f6313e088d49fc9f590 | assert|test_missing_port|import unittest import json import pytest from dummyserver.server import HAS_IPV6 from dummyserver.testcase import HTTPDummyServerTestCase, IPv6HTTPDummyServerTestCase from urllib3.poolmanager import PoolManager from urllib3.connectionpool import port_by_scheme from urllib3.exceptions import Ma... | b"Dummy server!" | 303 | 8 |
urllib3/urllib3 | train | 308 | 25add2a0bac43823a4a5ef9217578a2cf5bcfc69 | train | test/with_dummyserver/test_proxy_poolmanager.py | train | urllib3/urllib3:test/with_dummyserver/test_proxy_poolmanager.py | 132 | 12 | assert | test_redirect | import json
import socket
import unittest
import pytest
from dummyserver.testcase import HTTPDummyProxyTestCase, IPv6HTTPDummyProxyTestCase
from dummyserver.server import DEFAULT_CA, DEFAULT_CA_BAD, get_unreachable_address
from .. import TARPIT_HOST, requires_network
from urllib3._collections import HTTPHeaderDict
f... | b"Dummy server!" | added | 9d574c3e54663d20197971150b6a0a515e15c56892b3d64d80b87bf8134e8d52 | assert|test_redirect|import json import socket import unittest import pytest from dummyserver.testcase import HTTPDummyProxyTestCase, IPv6HTTPDummyProxyTestCase from dummyserver.server import DEFAULT_CA, DEFAULT_CA_BAD, get_unreachable_address from .. import TARPIT_HOST, requires_network from urllib3._collections impor... | null | null | null |
urllib3/urllib3 | train | 308 | 25add2a0bac43823a4a5ef9217578a2cf5bcfc69 | train | test/with_dummyserver/test_socketlevel.py | train | urllib3/urllib3:test/with_dummyserver/test_socketlevel.py | 1,465 | 12 | assert | test_headers_are_sent_with_the_original_case | # TODO: Break this module up into pieces. Maybe group by functionality tested
# rather than the socket level-ness of it.
from urllib3 import HTTPConnectionPool, HTTPSConnectionPool
from urllib3.poolmanager import proxy_from_url
from urllib3.exceptions import (
MaxRetryError,
ProxyError,
ReadTimeoutError,
... | parsed_headers | added | bbdc4db31f37532b71336ec73e2fb45e8b4e7fee6fd92c597a0b879baafcdacb | assert|test_headers_are_sent_with_the_original_case|# TODO: Break this module up into pieces. Maybe group by functionality tested # rather than the socket level-ness of it. from urllib3 import HTTPConnectionPool, HTTPSConnectionPool from urllib3.poolmanager import proxy_from_url from urllib3.exceptions import ( MaxRetr... | null | null | null |
urllib3/urllib3 | train | 309 | 1ef62aba7a813c33ddf1141c233de290d2e06ca8 | train | dummyserver/testcase.py | train | urllib3/urllib3:dummyserver/testcase.py | 84 | 16 | assert | import threading
import pytest
from tornado import ioloop, web
from dummyserver.server import (
SocketServerThread,
run_tornado_app,
run_loop_in_thread,
DEFAULT_CERTS,
HAS_IPV6,
)
from dummyserver.handlers import TestingApp
from dummyserver.proxy import ProxyHandler
def consume_socket(sock, chun... | expected_value | modified | 0ba35672d8a6448a2e09ccfe97dba2997dcf57dcc54f86d7b965f58982987944 | assert||import threading import pytest from tornado import ioloop, web from dummyserver.server import ( SocketServerThread, run_tornado_app, run_loop_in_thread, DEFAULT_CERTS, HAS_IPV6, ) from dummyserver.handlers import TestingApp from dummyserver.proxy import ProxyHandler def consume_socket(sock, chunks=65536): while... | expected_value | 85 | 16 | |
urllib3/urllib3 | train | 309 | 1ef62aba7a813c33ddf1141c233de290d2e06ca8 | train | test/appengine/test_gae_manager.py | test | urllib3/urllib3:test/appengine/test_gae_manager.py | 68 | 13 | pytest.raises | test_exceptions | import dummyserver.testcase
import pytest
from urllib3.contrib import appengine
import urllib3.exceptions
import urllib3.util.url
import urllib3.util.retry
from test.with_dummyserver import test_connectionpool
# This class is used so we can re-use the tests from the connection pool.
# It proxies all requests to the... | appengine.AppEnginePlatformError) | modified | fc96b94839ff1a742ab17f93f7ec154eb0b5e10eb07f0c1b67b54f5c9902b6c2 | pytest.raises|test_exceptions|import dummyserver.testcase import pytest from urllib3.contrib import appengine import urllib3.exceptions import urllib3.util.url import urllib3.util.retry from test.with_dummyserver import test_connectionpool # This class is used so we can re-use the tests from the connection pool. # It p... | appengine.AppEnginePlatformError) | 68 | 13 |
urllib3/urllib3 | train | 309 | 1ef62aba7a813c33ddf1141c233de290d2e06ca8 | train | test/contrib/test_pyopenssl.py | train | urllib3/urllib3:test/contrib/test_pyopenssl.py | 97 | 8 | assert | test_get_subj_alt_name | # -*- coding: utf-8 -*-
import os
import mock
import pytest
try:
from urllib3.contrib.pyopenssl import _dnsname_to_stdlib, get_subj_alt_name
from cryptography import x509
from OpenSSL.crypto import FILETYPE_PEM, load_certificate
except ImportError:
pass
def setup_module():
try:
from urll... | isinstance(mock_warning.call_args[0][1], x509.DuplicateExtension) | modified | 62c48394696724ed0faad278819178d79dc02313273b787d36eda8bcc6ad2f65 | assert|test_get_subj_alt_name|# -*- coding: utf-8 -*- import os import mock import pytest try: from urllib3.contrib.pyopenssl import _dnsname_to_stdlib, get_subj_alt_name from cryptography import x509 from OpenSSL.crypto import FILETYPE_PEM, load_certificate except ImportError: pass def setup_module(): try: from urllib... | isinstance(mock_warning.call_args[0][1], x509.DuplicateExtension) | 98 | 8 |
urllib3/urllib3 | train | 309 | 1ef62aba7a813c33ddf1141c233de290d2e06ca8 | train | test/contrib/test_pyopenssl_dependencies.py | train | urllib3/urllib3:test/contrib/test_pyopenssl_dependencies.py | 58 | 21 | pytest.raises | test_inject_validate_fail_pyopenssl | # -*- coding: utf-8 -*-
import pytest
from mock import patch, Mock
try:
from urllib3.contrib.pyopenssl import inject_into_urllib3, extract_from_urllib3
except ImportError:
pass
def setup_module():
try:
from urllib3.contrib.pyopenssl import inject_into_urllib3
inject_into_urllib3()
e... | ImportError) | modified | 03e9b1237cbbeffd2da20fb8cdeab7a45bfe148e791f71419de71c9bbb4871da | pytest.raises|test_inject_validate_fail_pyopenssl|# -*- coding: utf-8 -*- import pytest from mock import patch, Mock try: from urllib3.contrib.pyopenssl import inject_into_urllib3, extract_from_urllib3 except ImportError: pass def setup_module(): try: from urllib3.contrib.pyopenssl import inject_into_urllib3 inject_int... | ImportError) | 59 | 21 |
urllib3/urllib3 | train | 309 | 1ef62aba7a813c33ddf1141c233de290d2e06ca8 | train | test/test_no_ssl.py | train | urllib3/urllib3:test/test_no_ssl.py | 82 | 13 | pytest.raises | test_cannot_import_ssl | """
Test what happens if Python was built without SSL
* Everything that does not involve HTTPS should still work
* HTTPS requests must fail with an error that points at the ssl module
"""
import sys
import pytest
class ImportBlocker(object):
"""
Block Imports
To be placed on ``sys.meta_path``. This ens... | ImportError) | modified | 96583cf62e83ffb44bd71267371bc03376edffa2c856a179a34cd12465776fa3 | pytest.raises|test_cannot_import_ssl|""" Test what happens if Python was built without SSL * Everything that does not involve HTTPS should still work * HTTPS requests must fail with an error that points at the ssl module """ import sys import pytest class ImportBlocker(object): """ Block Imports To be placed on ``sys.m... | ImportError) | 82 | 13 |
urllib3/urllib3 | train | 309 | 1ef62aba7a813c33ddf1141c233de290d2e06ca8 | train | test/with_dummyserver/test_connectionpool.py | train | urllib3/urllib3:test/with_dummyserver/test_connectionpool.py | 737 | 21 | pytest.raises | test_source_address_error | import io
import logging
import socket
import sys
import time
import warnings
import pytest
import mock
from .. import TARPIT_HOST, VALID_SOURCE_ADDRESSES, INVALID_SOURCE_ADDRESSES
from ..port_helpers import find_unused_port
from urllib3 import encode_multipart_formdata, HTTPConnectionPool
from urllib3.exceptions imp... | NewConnectionError) | modified | 4b95be15643656127cb2a2754c51f7bf04d3e8c1cf1b49579886df1fa51746b9 | pytest.raises|test_source_address_error|import io import logging import socket import sys import time import warnings import pytest import mock from .. import TARPIT_HOST, VALID_SOURCE_ADDRESSES, INVALID_SOURCE_ADDRESSES from ..port_helpers import find_unused_port from urllib3 import encode_multipart_formdata, HTTPConn... | NewConnectionError) | 738 | 21 |
urllib3/urllib3 | train | 309 | 1ef62aba7a813c33ddf1141c233de290d2e06ca8 | train | test/with_dummyserver/test_https.py | train | urllib3/urllib3:test/with_dummyserver/test_https.py | 586 | 21 | pytest.raises | test_enhanced_timeout | import datetime
import json
import logging
import ssl
import sys
import warnings
import mock
import pytest
from dummyserver.testcase import HTTPSDummyServerTestCase, IPV6HTTPSDummyServerTestCase
from dummyserver.server import (
DEFAULT_CA,
DEFAULT_CA_BAD,
DEFAULT_CERTS,
DEFAULT_CLIENT_CERTS,
DEFAU... | ConnectTimeoutError) | modified | 2e9ed880c6f618771d84b3fd52b709cf809d84b3185273b299a7f90776c96e76 | pytest.raises|test_enhanced_timeout|import datetime import json import logging import ssl import sys import warnings import mock import pytest from dummyserver.testcase import HTTPSDummyServerTestCase, IPV6HTTPSDummyServerTestCase from dummyserver.server import ( DEFAULT_CA, DEFAULT_CA_BAD, DEFAULT_CERTS, DEFAULT_CLIEN... | ConnectTimeoutError) | 587 | 21 |
urllib3/urllib3 | train | 309 | 1ef62aba7a813c33ddf1141c233de290d2e06ca8 | train | test/with_dummyserver/test_proxy_poolmanager.py | train | urllib3/urllib3:test/with_dummyserver/test_proxy_poolmanager.py | 185 | 12 | assert | test_cross_protocol_redirect | import json
import socket
import pytest
from dummyserver.testcase import HTTPDummyProxyTestCase, IPv6HTTPDummyProxyTestCase
from dummyserver.server import DEFAULT_CA, DEFAULT_CA_BAD, get_unreachable_address
from .. import TARPIT_HOST, requires_network
from urllib3._collections import HTTPHeaderDict
from urllib3.pool... | self.https_host | modified | a70932bd9d1c169fbd4a284a2c1c67db3203ad995a0726c1760557a724932e47 | assert|test_cross_protocol_redirect|import json import socket import pytest from dummyserver.testcase import HTTPDummyProxyTestCase, IPv6HTTPDummyProxyTestCase from dummyserver.server import DEFAULT_CA, DEFAULT_CA_BAD, get_unreachable_address from .. import TARPIT_HOST, requires_network from urllib3._collections import... | self.https_host | 184 | 12 |
urllib3/urllib3 | train | 310 | 15acc9f8b4c88942123bd966b0c60a9075605a62 | train | test/test_response.py | train | urllib3/urllib3:test/test_response.py | 474 | 8 | assert | test_deflate_streaming_tell_intermediate_point | import socket
import zlib
from io import BytesIO, BufferedReader
import pytest
import mock
from urllib3.response import HTTPResponse, brotli
from urllib3.exceptions import (
DecodeError,
ResponseNotChunked,
ProtocolError,
InvalidHeader,
)
from urllib3.packages.six.moves import http_client as httplib
... | payload | modified | 5c667cbbfac416e4dc6f48c69e082c5a4cc956abfaf9b946900d68e80d742170 | assert|test_deflate_streaming_tell_intermediate_point|import socket import zlib from io import BytesIO, BufferedReader import pytest import mock from urllib3.response import HTTPResponse, brotli from urllib3.exceptions import ( DecodeError, ResponseNotChunked, ProtocolError, InvalidHeader, ) from urllib3.packages.six.m... | payload | 474 | 8 |
urllib3/urllib3 | train | 310 | 15acc9f8b4c88942123bd966b0c60a9075605a62 | train | test/test_response.py | train | urllib3/urllib3:test/test_response.py | 562 | 13 | pytest.raises | test_length_with_multiple_content_lengths | import socket
import zlib
from io import BytesIO, BufferedReader
import pytest
import mock
from urllib3.response import HTTPResponse, brotli
from urllib3.exceptions import (
DecodeError,
ResponseNotChunked,
ProtocolError,
InvalidHeader,
)
from urllib3.packages.six.moves import http_client as httplib
... | InvalidHeader) | modified | a06e5bf6042d8f0df3e5a9a74fadc36e32247b9716a7cc63c1487a9b5edea796 | pytest.raises|test_length_with_multiple_content_lengths|import socket import zlib from io import BytesIO, BufferedReader import pytest import mock from urllib3.response import HTTPResponse, brotli from urllib3.exceptions import ( DecodeError, ResponseNotChunked, ProtocolError, InvalidHeader, ) from urllib3.packages.six... | InvalidHeader) | 562 | 13 |
urllib3/urllib3 | train | 310 | 15acc9f8b4c88942123bd966b0c60a9075605a62 | train | test/test_response.py | train | urllib3/urllib3:test/test_response.py | 612 | 13 | pytest.raises | test_mock_httpresponse_stream | import socket
import zlib
from io import BytesIO, BufferedReader
import pytest
import mock
from urllib3.response import HTTPResponse, brotli
from urllib3.exceptions import (
DecodeError,
ResponseNotChunked,
ProtocolError,
InvalidHeader,
)
from urllib3.packages.six.moves import http_client as httplib
... | StopIteration) | modified | 52a6d4307a28b1ba1449a6b95a25a4320ab22eef023360766e3b61e09a15897e | pytest.raises|test_mock_httpresponse_stream|import socket import zlib from io import BytesIO, BufferedReader import pytest import mock from urllib3.response import HTTPResponse, brotli from urllib3.exceptions import ( DecodeError, ResponseNotChunked, ProtocolError, InvalidHeader, ) from urllib3.packages.six.moves impor... | StopIteration) | 612 | 13 |
urllib3/urllib3 | train | 310 | 15acc9f8b4c88942123bd966b0c60a9075605a62 | train | test/test_response.py | train | urllib3/urllib3:test/test_response.py | 756 | 8 | assert | test_geturl | import socket
import zlib
from io import BytesIO, BufferedReader
import pytest
import mock
from urllib3.response import HTTPResponse, brotli
from urllib3.exceptions import (
DecodeError,
ResponseNotChunked,
ProtocolError,
InvalidHeader,
)
from urllib3.packages.six.moves import http_client as httplib
... | request_url | modified | 2ab47e40150c2b2f57de7d29c296562be5db5d975b553855017e8a3d0bf4b093 | assert|test_geturl|import socket import zlib from io import BytesIO, BufferedReader import pytest import mock from urllib3.response import HTTPResponse, brotli from urllib3.exceptions import ( DecodeError, ResponseNotChunked, ProtocolError, InvalidHeader, ) from urllib3.packages.six.moves import http_client as httplib ... | request_url | 756 | 8 |
urllib3/urllib3 | train | 311 | 5b047b645f5f93900d5e2fc31230848c25eb1f5f | train | test/test_util.py | train | urllib3/urllib3:test/test_util.py | 340 | 8 | assert | test_Url_str | # coding: utf-8
import hashlib
import warnings
import logging
import io
import ssl
import socket
from itertools import chain
from mock import patch, Mock
import pytest
from urllib3 import add_stderr_logger, disable_warnings
from urllib3.util.request import make_headers, rewind_body, _FAILEDTELL
from urllib3.util.resp... | U.url | added | 0165629f7f741dfa2bcd7673e643302ee93812fe76dd91c8d341d75c43183f29 | assert|test_Url_str|# coding: utf-8 import hashlib import warnings import logging import io import ssl import socket from itertools import chain from mock import patch, Mock import pytest from urllib3 import add_stderr_logger, disable_warnings from urllib3.util.request import make_headers, rewind_body, _FAILEDTELL from... | null | null | null |
urllib3/urllib3 | train | 311 | 5b047b645f5f93900d5e2fc31230848c25eb1f5f | train | test/test_util.py | train | urllib3/urllib3:test/test_util.py | 504 | 8 | assert | test_rewind_body | # coding: utf-8
import hashlib
import warnings
import logging
import io
import ssl
import socket
from itertools import chain
from mock import patch, Mock
import pytest
from urllib3 import add_stderr_logger, disable_warnings
from urllib3.util.request import make_headers, rewind_body, _FAILEDTELL
from urllib3.util.resp... | b"data" | added | 5b15a4dec1bfb198cf9ac10efdf2f771558d831c61312fc4849e49bfafbaaca8 | assert|test_rewind_body|# coding: utf-8 import hashlib import warnings import logging import io import ssl import socket from itertools import chain from mock import patch, Mock import pytest from urllib3 import add_stderr_logger, disable_warnings from urllib3.util.request import make_headers, rewind_body, _FAILEDTELL ... | null | null | null |
urllib3/urllib3 | train | 311 | 5b047b645f5f93900d5e2fc31230848c25eb1f5f | train | test/test_util.py | train | urllib3/urllib3:test/test_util.py | 530 | 13 | pytest.raises | test_rewind_body_failed_seek | # coding: utf-8
import hashlib
import warnings
import logging
import io
import ssl
import socket
from itertools import chain
from mock import patch, Mock
import pytest
from urllib3 import add_stderr_logger, disable_warnings
from urllib3.util.request import make_headers, rewind_body, _FAILEDTELL
from urllib3.util.resp... | UnrewindableBodyError) | added | 9bc6747e9651f97923c12b0efd26f8188ef3af2e6e095d96527b1cbb832ac385 | pytest.raises|test_rewind_body_failed_seek|# coding: utf-8 import hashlib import warnings import logging import io import ssl import socket from itertools import chain from mock import patch, Mock import pytest from urllib3 import add_stderr_logger, disable_warnings from urllib3.util.request import make_headers, rewind... | null | null | null |
urllib3/urllib3 | train | 311 | 5b047b645f5f93900d5e2fc31230848c25eb1f5f | train | test/test_util.py | train | urllib3/urllib3:test/test_util.py | 799 | 12 | assert | test_has_ipv6_disabled_on_appengine | # coding: utf-8
import hashlib
import warnings
import logging
import io
import ssl
import socket
from itertools import chain
from mock import patch, Mock
import pytest
from urllib3 import add_stderr_logger, disable_warnings
from urllib3.util.request import make_headers, rewind_body, _FAILEDTELL
from urllib3.util.resp... | not _has_ipv6("::1") | added | aaf36cb482d14efd67aa8bde7d3fe847c29ee3e73dca40bf4ffecec90abf1288 | assert|test_has_ipv6_disabled_on_appengine|# coding: utf-8 import hashlib import warnings import logging import io import ssl import socket from itertools import chain from mock import patch, Mock import pytest from urllib3 import add_stderr_logger, disable_warnings from urllib3.util.request import make_headers, rewind... | null | null | null |
urllib3/urllib3 | train | 312 | deb21bc858bb45a7052b2ebb0be16aab704b6291 | train | test/test_connection.py | test | urllib3/urllib3:test/test_connection.py | 39 | 12 | assert_* | test_match_hostname_mismatch | import datetime
import mock
import pytest
from urllib3.connection import CertificateError, _match_hostname, RECENT_DATE
class TestConnection(object):
"""
Tests in this suite should not make any network requests or connections.
"""
def test_match_hostname_no_cert(self):
cert = None
a... | {"subjectAltName": [("DNS", "foo")]}) | modified | 82251c42c1180a8cd4fe2a0dd86cda00de64b05f5a22094112385188a9acb3e4 | assert_*|test_match_hostname_mismatch|import datetime import mock import pytest from urllib3.connection import CertificateError, _match_hostname, RECENT_DATE class TestConnection(object): """ Tests in this suite should not make any network requests or connections. """ def test_match_hostname_no_cert(self): cert = None ... | {"subjectAltName": [("DNS", "foo")]}) | 39 | 12 |
urllib3/urllib3 | train | 312 | deb21bc858bb45a7052b2ebb0be16aab704b6291 | train | test/test_connection.py | test | urllib3/urllib3:test/test_connection.py | 44 | 12 | assert | test_match_hostname_mismatch | import datetime
import mock
import pytest
from urllib3.connection import CertificateError, _match_hostname, RECENT_DATE
class TestConnection(object):
"""
Tests in this suite should not make any network requests or connections.
"""
def test_match_hostname_no_cert(self):
cert = None
a... | cert | modified | 410ff4808dc66b66e130cdbe3254336548389eed640231d437d1ee5baf33bc57 | assert|test_match_hostname_mismatch|import datetime import mock import pytest from urllib3.connection import CertificateError, _match_hostname, RECENT_DATE class TestConnection(object): """ Tests in this suite should not make any network requests or connections. """ def test_match_hostname_no_cert(self): cert = None as... | cert | 44 | 12 |
urllib3/urllib3 | train | 312 | deb21bc858bb45a7052b2ebb0be16aab704b6291 | train | test/test_connection.py | test | urllib3/urllib3:test/test_connection.py | 52 | 8 | assert | test_recent_date | import datetime
import mock
import pytest
from urllib3.connection import CertificateError, _match_hostname, RECENT_DATE
class TestConnection(object):
"""
Tests in this suite should not make any network requests or connections.
"""
def test_match_hostname_no_cert(self):
cert = None
a... | (datetime.datetime.today() - two_years).date() | modified | 642e546c93a6d4b9e7072ef961b91b14f2db5f2d6d3155f13f91e966a03a2057 | assert|test_recent_date|import datetime import mock import pytest from urllib3.connection import CertificateError, _match_hostname, RECENT_DATE class TestConnection(object): """ Tests in this suite should not make any network requests or connections. """ def test_match_hostname_no_cert(self): cert = None asserted_hostn... | (datetime.datetime.today() - two_years).date() | 52 | 8 |
urllib3/urllib3 | train | 313 | f0d9ebc41e51c4c4c9990b1eed02d297fd1b20d8 | train | test/test_response.py | train | urllib3/urllib3:test/test_response.py | 61 | 8 | assert | test_getheader | # -*- coding: utf-8 -*-
import socket
import zlib
from io import BytesIO, BufferedReader, TextIOWrapper
import pytest
import mock
import six
from urllib3.response import HTTPResponse, brotli
from urllib3.exceptions import (
DecodeError,
ResponseNotChunked,
ProtocolError,
InvalidHeader,
)
from urllib... | "example.com" | modified | 5e2efb8832db227d6bd8a4b50872e25f46462af25ec7d92260a02d34c662769c | assert|test_getheader|# -*- coding: utf-8 -*- import socket import zlib from io import BytesIO, BufferedReader, TextIOWrapper import pytest import mock import six from urllib3.response import HTTPResponse, brotli from urllib3.exceptions import ( DecodeError, ResponseNotChunked, ProtocolError, InvalidHeader, ) from urll... | "example.com" | 58 | 8 |
urllib3/urllib3 | train | 313 | f0d9ebc41e51c4c4c9990b1eed02d297fd1b20d8 | train | test/test_response.py | train | urllib3/urllib3:test/test_response.py | 259 | 8 | assert | test_multi_decoding_deflate_deflate | # -*- coding: utf-8 -*-
import socket
import zlib
from io import BytesIO, BufferedReader, TextIOWrapper
import pytest
import mock
import six
from urllib3.response import HTTPResponse, brotli
from urllib3.exceptions import (
DecodeError,
ResponseNotChunked,
ProtocolError,
InvalidHeader,
)
from urllib... | b"foo" | modified | d96df5a5d1fbb77118d24afbbf37ca7504ebf68d494bb385a8737c0f277d943c | assert|test_multi_decoding_deflate_deflate|# -*- coding: utf-8 -*- import socket import zlib from io import BytesIO, BufferedReader, TextIOWrapper import pytest import mock import six from urllib3.response import HTTPResponse, brotli from urllib3.exceptions import ( DecodeError, ResponseNotChunked, ProtocolError, Inval... | b"foo" | 256 | 8 |
urllib3/urllib3 | train | 313 | f0d9ebc41e51c4c4c9990b1eed02d297fd1b20d8 | train | test/test_response.py | train | urllib3/urllib3:test/test_response.py | 687 | 8 | assert | test_mock_httpresponse_stream | # -*- coding: utf-8 -*-
import socket
import zlib
from io import BytesIO, BufferedReader, TextIOWrapper
import pytest
import mock
import six
from urllib3.response import HTTPResponse, brotli
from urllib3.exceptions import (
DecodeError,
ResponseNotChunked,
ProtocolError,
InvalidHeader,
)
from urllib... | b"fo" | added | 25755b80a90f181e72b5d1f887f660b6b0ec0bdf73d8215a488a30f8b24d5c2c | assert|test_mock_httpresponse_stream|# -*- coding: utf-8 -*- import socket import zlib from io import BytesIO, BufferedReader, TextIOWrapper import pytest import mock import six from urllib3.response import HTTPResponse, brotli from urllib3.exceptions import ( DecodeError, ResponseNotChunked, ProtocolError, InvalidHead... | null | null | null |
urllib3/urllib3 | train | 313 | f0d9ebc41e51c4c4c9990b1eed02d297fd1b20d8 | train | test/test_response.py | train | urllib3/urllib3:test/test_response.py | 893 | 8 | assert | test__iter__decode_content | # -*- coding: utf-8 -*-
import socket
import zlib
from io import BytesIO, BufferedReader, TextIOWrapper
import pytest
import mock
import six
from urllib3.response import HTTPResponse, brotli
from urllib3.exceptions import (
DecodeError,
ResponseNotChunked,
ProtocolError,
InvalidHeader,
)
from urllib... | data | added | 5b8213835547886304f244a8a9633118d78551dc9e0520a5fb8ee591064064b6 | assert|test__iter__decode_content|# -*- coding: utf-8 -*- import socket import zlib from io import BytesIO, BufferedReader, TextIOWrapper import pytest import mock import six from urllib3.response import HTTPResponse, brotli from urllib3.exceptions import ( DecodeError, ResponseNotChunked, ProtocolError, InvalidHeader,... | null | null | null |
urllib3/urllib3 | train | 314 | 6a626be4ff623c25270e20db9002705bf4504e4e | train | test/test_ssl.py | train | urllib3/urllib3:test/test_ssl.py | 164 | 4 | assert | test_create_urllib3_context_pha | import mock
import pytest
from urllib3.util import ssl_
from urllib3.exceptions import SNIMissingWarning
@pytest.mark.parametrize(
"addr",
[
# IPv6
"::1",
"::",
"FE80::8939:7684:D84b:a5A4%251",
# IPv4
"127.0.0.1",
"8.8.8.8",
b"127.0.0.1",
... | context | added | 4de004c8f61f8413e5ab7b1bf9e846744c1fe6f6c9fba2befa8fd65ef70783be | assert|test_create_urllib3_context_pha|import mock import pytest from urllib3.util import ssl_ from urllib3.exceptions import SNIMissingWarning @pytest.mark.parametrize( "addr", [ # IPv6 "::1", "::", "FE80::8939:7684:D84b:a5A4%251", # IPv4 "127.0.0.1", "8.8.8.8", b"127.0.0.1", # IPv6 w/ Zone IDs "FE80::8939:7684:D84b:a... | null | null | null |
urllib3/urllib3 | train | 314 | 6a626be4ff623c25270e20db9002705bf4504e4e | train | test/test_ssl.py | train | urllib3/urllib3:test/test_ssl.py | 166 | 4 | assert | test_create_urllib3_context_pha | import mock
import pytest
from urllib3.util import ssl_
from urllib3.exceptions import SNIMissingWarning
@pytest.mark.parametrize(
"addr",
[
# IPv6
"::1",
"::",
"FE80::8939:7684:D84b:a5A4%251",
# IPv4
"127.0.0.1",
"8.8.8.8",
b"127.0.0.1",
... | expected_pha | added | 86b1f495850105c058512d326016b8d62f960c00fc64088708f6e16ce08f8865 | assert|test_create_urllib3_context_pha|import mock import pytest from urllib3.util import ssl_ from urllib3.exceptions import SNIMissingWarning @pytest.mark.parametrize( "addr", [ # IPv6 "::1", "::", "FE80::8939:7684:D84b:a5A4%251", # IPv4 "127.0.0.1", "8.8.8.8", b"127.0.0.1", # IPv6 w/ Zone IDs "FE80::8939:7684:D84b:a... | null | null | null |
urllib3/urllib3 | train | 315 | ae7f8bbb57e74ffdb327c5e510963a886fa4ed8b | train | test/test_collections.py | train | urllib3/urllib3:test/test_collections.py | 366 | 8 | assert | test_from_httplib_py2 | from urllib3._collections import HTTPHeaderDict, RecentlyUsedContainer as Container
import pytest
from urllib3.exceptions import InvalidHeader
from urllib3.packages import six
xrange = six.moves.xrange
class TestLRUContainer(object):
def test_maxsize(self):
d = Container(5)
for i in xrange(5):
... | "nginx" | modified | ad21d452ca90e5ed60067bebfb823733bfca51f268c08161578a0f8183509956 | assert|test_from_httplib_py2|from urllib3._collections import HTTPHeaderDict, RecentlyUsedContainer as Container import pytest from urllib3.exceptions import InvalidHeader from urllib3.packages import six xrange = six.moves.xrange class TestLRUContainer(object): def test_maxsize(self): d = Container(5) for i in xrange(... | "nginx" | 366 | 8 |
urllib3/urllib3 | train | 315 | ae7f8bbb57e74ffdb327c5e510963a886fa4ed8b | train | test/test_collections.py | train | urllib3/urllib3:test/test_collections.py | 369 | 8 | assert | test_from_httplib_py2 | from urllib3._collections import HTTPHeaderDict, RecentlyUsedContainer as Container
import pytest
from urllib3.exceptions import InvalidHeader
from urllib3.packages import six
xrange = six.moves.xrange
class TestLRUContainer(object):
def test_maxsize(self):
d = Container(5)
for i in xrange(5):
... | cookies[0].startswith("bb_lastvisit") | modified | 69ce299b0005fb5e61d29bdc4eed67d89dcb207e0daa8323142df8d745c7a7ee | assert|test_from_httplib_py2|from urllib3._collections import HTTPHeaderDict, RecentlyUsedContainer as Container import pytest from urllib3.exceptions import InvalidHeader from urllib3.packages import six xrange = six.moves.xrange class TestLRUContainer(object): def test_maxsize(self): d = Container(5) for i in xrange(... | cookies[0].startswith("bb_lastvisit") | 369 | 8 |
urllib3/urllib3 | train | 315 | ae7f8bbb57e74ffdb327c5e510963a886fa4ed8b | train | test/test_collections.py | train | urllib3/urllib3:test/test_collections.py | 372 | 8 | assert | test_from_httplib_py2 | from urllib3._collections import HTTPHeaderDict, RecentlyUsedContainer as Container
import pytest
from urllib3.exceptions import InvalidHeader
from urllib3.packages import six
xrange = six.moves.xrange
class TestLRUContainer(object):
def test_maxsize(self):
d = Container(5)
for i in xrange(5):
... | "asdf, bla" | modified | 7bf48ab303ada1f28b7e52700ce2799060471f26f8bcfca0ea8e91906ee59696 | assert|test_from_httplib_py2|from urllib3._collections import HTTPHeaderDict, RecentlyUsedContainer as Container import pytest from urllib3.exceptions import InvalidHeader from urllib3.packages import six xrange = six.moves.xrange class TestLRUContainer(object): def test_maxsize(self): d = Container(5) for i in xrange(... | "asdf, bla" | 372 | 8 |
urllib3/urllib3 | train | 315 | ae7f8bbb57e74ffdb327c5e510963a886fa4ed8b | train | test/test_collections.py | train | urllib3/urllib3:test/test_collections.py | 373 | 8 | assert | test_from_httplib_py2 | from urllib3._collections import HTTPHeaderDict, RecentlyUsedContainer as Container
import pytest
from urllib3.exceptions import InvalidHeader
from urllib3.packages import six
xrange = six.moves.xrange
class TestLRUContainer(object):
def test_maxsize(self):
d = Container(5)
for i in xrange(5):
... | ["asdf", "bla"] | modified | 608df6491b5b091f55051a146eebead9e7c99b248a75bc5ca893f20464b3596b | assert|test_from_httplib_py2|from urllib3._collections import HTTPHeaderDict, RecentlyUsedContainer as Container import pytest from urllib3.exceptions import InvalidHeader from urllib3.packages import six xrange = six.moves.xrange class TestLRUContainer(object): def test_maxsize(self): d = Container(5) for i in xrange(... | ["asdf", "bla"] | 373 | 8 |
urllib3/urllib3 | train | 316 | 26cfb9a401078aa9afed871243b30581f59d0e1b | train | test/with_dummyserver/test_connectionpool.py | train | urllib3/urllib3:test/with_dummyserver/test_connectionpool.py | 774 | 17 | pytest.raises | test_read_chunked_on_closed_response | import io
import logging
import socket
import sys
import time
import warnings
import pytest
import mock
from .. import TARPIT_HOST, VALID_SOURCE_ADDRESSES, INVALID_SOURCE_ADDRESSES
from ..port_helpers import find_unused_port
from urllib3 import encode_multipart_formdata, HTTPConnectionPool
from urllib3.exceptions imp... | StopIteration) | added | 445c8bca795d3b6cdfeeac9249fc642a794259b808d34418075d5470425ce480 | pytest.raises|test_read_chunked_on_closed_response|import io import logging import socket import sys import time import warnings import pytest import mock from .. import TARPIT_HOST, VALID_SOURCE_ADDRESSES, INVALID_SOURCE_ADDRESSES from ..port_helpers import find_unused_port from urllib3 import encode_multipart_formdat... | null | null | null |
urllib3/urllib3 | train | 316 | 26cfb9a401078aa9afed871243b30581f59d0e1b | train | test/with_dummyserver/test_connectionpool.py | train | urllib3/urllib3:test/with_dummyserver/test_connectionpool.py | 818 | 12 | assert | test_cleanup_on_connection_error | import io
import logging
import socket
import sys
import time
import warnings
import pytest
import mock
from .. import TARPIT_HOST, VALID_SOURCE_ADDRESSES, INVALID_SOURCE_ADDRESSES
from ..port_helpers import find_unused_port
from urllib3 import encode_multipart_formdata, HTTPConnectionPool
from urllib3.exceptions imp... | http.pool.maxsize | added | 77d014caa0bdc2e36d094ab9e1cbd42a6215cd3cf3fee696d81fe2348507aa3c | assert|test_cleanup_on_connection_error|import io import logging import socket import sys import time import warnings import pytest import mock from .. import TARPIT_HOST, VALID_SOURCE_ADDRESSES, INVALID_SOURCE_ADDRESSES from ..port_helpers import find_unused_port from urllib3 import encode_multipart_formdata, HTTPConn... | null | null | null |
urllib3/urllib3 | train | 316 | 26cfb9a401078aa9afed871243b30581f59d0e1b | train | test/with_dummyserver/test_connectionpool.py | train | urllib3/urllib3:test/with_dummyserver/test_connectionpool.py | 854 | 17 | pytest.raises | test_disabled_retry | import io
import logging
import socket
import sys
import time
import warnings
import pytest
import mock
from .. import TARPIT_HOST, VALID_SOURCE_ADDRESSES, INVALID_SOURCE_ADDRESSES
from ..port_helpers import find_unused_port
from urllib3 import encode_multipart_formdata, HTTPConnectionPool
from urllib3.exceptions imp... | NewConnectionError) | added | 4bdd64ab3b815d42a4ffc3832f667287b295489c52dfa8cea2680e40368abae0 | pytest.raises|test_disabled_retry|import io import logging import socket import sys import time import warnings import pytest import mock from .. import TARPIT_HOST, VALID_SOURCE_ADDRESSES, INVALID_SOURCE_ADDRESSES from ..port_helpers import find_unused_port from urllib3 import encode_multipart_formdata, HTTPConnection... | null | null | null |
urllib3/urllib3 | train | 316 | 26cfb9a401078aa9afed871243b30581f59d0e1b | train | test/with_dummyserver/test_connectionpool.py | train | urllib3/urllib3:test/with_dummyserver/test_connectionpool.py | 944 | 12 | assert | test_retry_return_in_response | import io
import logging
import socket
import sys
import time
import warnings
import pytest
import mock
from .. import TARPIT_HOST, VALID_SOURCE_ADDRESSES, INVALID_SOURCE_ADDRESSES
from ..port_helpers import find_unused_port
from urllib3 import encode_multipart_formdata, HTTPConnectionPool
from urllib3.exceptions imp... | ( RequestHistory("GET", "/successful_retry", None, 418, None), ) | added | 90f24f98fe2f9b32284b0eafcf5cf370f54ba9d17e8c31d2c6f67b332f67b4c4 | assert|test_retry_return_in_response|import io import logging import socket import sys import time import warnings import pytest import mock from .. import TARPIT_HOST, VALID_SOURCE_ADDRESSES, INVALID_SOURCE_ADDRESSES from ..port_helpers import find_unused_port from urllib3 import encode_multipart_formdata, HTTPConnect... | null | null | null |
urllib3/urllib3 | train | 317 | 0a2950defa48cbf7776145ff63569e795ac5e63c | train | test/contrib/test_securetransport.py | train | urllib3/urllib3:test/contrib/test_securetransport.py | 51 | 13 | pytest.raises | test_no_crash_with_empty_trust_bundle | # -*- coding: utf-8 -*-
import contextlib
import socket
import ssl
import pytest
try:
from urllib3.contrib.securetransport import WrappedSocket
except ImportError:
pass
def setup_module():
try:
from urllib3.contrib.securetransport import inject_into_urllib3
inject_into_urllib3()
exc... | ssl.SSLError) | added | 7ddb6df0911be21fa5ddd40add00a4862fe82615f970435a36bf85860aff804a | pytest.raises|test_no_crash_with_empty_trust_bundle|# -*- coding: utf-8 -*- import contextlib import socket import ssl import pytest try: from urllib3.contrib.securetransport import WrappedSocket except ImportError: pass def setup_module(): try: from urllib3.contrib.securetransport import inject_into_urllib3 inject_int... | null | null | null |
urllib3/urllib3 | train | 317 | 0a2950defa48cbf7776145ff63569e795ac5e63c | train | test/with_dummyserver/test_connectionpool.py | train | urllib3/urllib3:test/with_dummyserver/test_connectionpool.py | 766 | 17 | pytest.raises | test_read_chunked_short_circuit | import io
import logging
import socket
import sys
import time
import warnings
import pytest
import mock
from .. import TARPIT_HOST, VALID_SOURCE_ADDRESSES, INVALID_SOURCE_ADDRESSES
from ..port_helpers import find_unused_port
from urllib3 import encode_multipart_formdata, HTTPConnectionPool
from urllib3.exceptions imp... | StopIteration) | modified | f61bd86f581cc69489423d59583e18dbaffd01fef843f17cd9815c228d114fc3 | pytest.raises|test_read_chunked_short_circuit|import io import logging import socket import sys import time import warnings import pytest import mock from .. import TARPIT_HOST, VALID_SOURCE_ADDRESSES, INVALID_SOURCE_ADDRESSES from ..port_helpers import find_unused_port from urllib3 import encode_multipart_formdata, HT... | StopIteration) | 767 | 17 |
urllib3/urllib3 | train | 317 | 0a2950defa48cbf7776145ff63569e795ac5e63c | train | test/with_dummyserver/test_connectionpool.py | train | urllib3/urllib3:test/with_dummyserver/test_connectionpool.py | 951 | 12 | assert | test_retry_redirect_history | import io
import logging
import socket
import sys
import time
import warnings
import pytest
import mock
from .. import TARPIT_HOST, VALID_SOURCE_ADDRESSES, INVALID_SOURCE_ADDRESSES
from ..port_helpers import find_unused_port
from urllib3 import encode_multipart_formdata, HTTPConnectionPool
from urllib3.exceptions imp... | ( RequestHistory("GET", "/redirect?target=%2F", None, 303, "/"), ) | modified | f9be51155d1ffd6b73ad91118ec8ab73004175e63b956f25e8448f974685bfec | assert|test_retry_redirect_history|import io import logging import socket import sys import time import warnings import pytest import mock from .. import TARPIT_HOST, VALID_SOURCE_ADDRESSES, INVALID_SOURCE_ADDRESSES from ..port_helpers import find_unused_port from urllib3 import encode_multipart_formdata, HTTPConnectio... | ( RequestHistory("GET", "/redirect?target=%2F", None, 303, "/"), ) | 952 | 12 |
urllib3/urllib3 | train | 317 | 0a2950defa48cbf7776145ff63569e795ac5e63c | train | test/with_dummyserver/test_connectionpool.py | train | urllib3/urllib3:test/with_dummyserver/test_connectionpool.py | 987 | 12 | assert | test_multi_redirect_history | import io
import logging
import socket
import sys
import time
import warnings
import pytest
import mock
from .. import TARPIT_HOST, VALID_SOURCE_ADDRESSES, INVALID_SOURCE_ADDRESSES
from ..port_helpers import find_unused_port
from urllib3 import encode_multipart_formdata, HTTPConnectionPool
from urllib3.exceptions imp... | expected | modified | eee5047b46ac9acacb8f78b8aaa7f9327479091a37e8927956fdcfdb9f470acf | assert|test_multi_redirect_history|import io import logging import socket import sys import time import warnings import pytest import mock from .. import TARPIT_HOST, VALID_SOURCE_ADDRESSES, INVALID_SOURCE_ADDRESSES from ..port_helpers import find_unused_port from urllib3 import encode_multipart_formdata, HTTPConnectio... | expected | 988 | 12 |
urllib3/urllib3 | train | 317 | 0a2950defa48cbf7776145ff63569e795ac5e63c | train | test/with_dummyserver/test_https.py | train | urllib3/urllib3:test/with_dummyserver/test_https.py | 186 | 12 | assert | test_client_encrypted_key_requires_password | import datetime
import json
import logging
import ssl
import sys
import warnings
import mock
import pytest
from dummyserver.testcase import HTTPSDummyServerTestCase, IPV6HTTPSDummyServerTestCase
from dummyserver.server import (
DEFAULT_CA,
DEFAULT_CA_BAD,
DEFAULT_CERTS,
DEFAULT_CLIENT_CERTS,
DEFAU... | str(e.value) | added | f32e0888c9e829e67ba668276d972f533f21e0e3b0186dc61b4bbdc57d2ab4dc | assert|test_client_encrypted_key_requires_password|import datetime import json import logging import ssl import sys import warnings import mock import pytest from dummyserver.testcase import HTTPSDummyServerTestCase, IPV6HTTPSDummyServerTestCase from dummyserver.server import ( DEFAULT_CA, DEFAULT_CA_BAD, DEFAULT_CERTS... | null | null | null |
urllib3/urllib3 | train | 317 | 0a2950defa48cbf7776145ff63569e795ac5e63c | train | test/with_dummyserver/test_https.py | train | urllib3/urllib3:test/with_dummyserver/test_https.py | 254 | 12 | assert | test_context_combines_with_ca_certs | import datetime
import json
import logging
import ssl
import sys
import warnings
import mock
import pytest
from dummyserver.testcase import HTTPSDummyServerTestCase, IPV6HTTPSDummyServerTestCase
from dummyserver.server import (
DEFAULT_CA,
DEFAULT_CA_BAD,
DEFAULT_CERTS,
DEFAULT_CLIENT_CERTS,
DEFAU... | VerifiedHTTPSConnection | modified | 1c94b8f677bbb786af33718e90df19d6a626012d4c2f8f337c086e5b8ac5b6f4 | assert|test_context_combines_with_ca_certs|import datetime import json import logging import ssl import sys import warnings import mock import pytest from dummyserver.testcase import HTTPSDummyServerTestCase, IPV6HTTPSDummyServerTestCase from dummyserver.server import ( DEFAULT_CA, DEFAULT_CA_BAD, DEFAULT_CERTS, DEFAUL... | 200 | 253 | 16 |
urllib3/urllib3 | train | 317 | 0a2950defa48cbf7776145ff63569e795ac5e63c | train | test/with_dummyserver/test_https.py | train | urllib3/urllib3:test/with_dummyserver/test_https.py | 500 | 17 | pytest.raises | test_verify_none_and_bad_fingerprint | import datetime
import json
import logging
import ssl
import sys
import warnings
import mock
import pytest
from dummyserver.testcase import HTTPSDummyServerTestCase, IPV6HTTPSDummyServerTestCase
from dummyserver.server import (
DEFAULT_CA,
DEFAULT_CA_BAD,
DEFAULT_CERTS,
DEFAULT_CLIENT_CERTS,
DEFAU... | MaxRetryError) | added | 2256671c421db69af9ed131f0868e26689852ccf4e632ec64edc0e90bab160cc | pytest.raises|test_verify_none_and_bad_fingerprint|import datetime import json import logging import ssl import sys import warnings import mock import pytest from dummyserver.testcase import HTTPSDummyServerTestCase, IPV6HTTPSDummyServerTestCase from dummyserver.server import ( DEFAULT_CA, DEFAULT_CA_BAD, DEFAULT_CERTS... | null | null | null |
urllib3/urllib3 | train | 317 | 0a2950defa48cbf7776145ff63569e795ac5e63c | train | test/with_dummyserver/test_https.py | train | urllib3/urllib3:test/with_dummyserver/test_https.py | 703 | 16 | assert | test_tls_protocol_name_of_socket | import datetime
import json
import logging
import ssl
import sys
import warnings
import mock
import pytest
from dummyserver.testcase import HTTPSDummyServerTestCase, IPV6HTTPSDummyServerTestCase
from dummyserver.server import (
DEFAULT_CA,
DEFAULT_CA_BAD,
DEFAULT_CERTS,
DEFAULT_CLIENT_CERTS,
DEFAU... | self.tls_protocol_name | added | 2037c12eb98144ba536db8e0f7eec739cb2820cac9571bfe54db13b661a57c3d | assert|test_tls_protocol_name_of_socket|import datetime import json import logging import ssl import sys import warnings import mock import pytest from dummyserver.testcase import HTTPSDummyServerTestCase, IPV6HTTPSDummyServerTestCase from dummyserver.server import ( DEFAULT_CA, DEFAULT_CA_BAD, DEFAULT_CERTS, DEFAULT_C... | null | null | null |
urllib3/urllib3 | train | 318 | 9167b58128dbfe3ddcbab253166697348d8d364c | train | test/test_util.py | train | urllib3/urllib3:test/test_util.py | 331 | 8 | assert | test_parse_and_normalize_url_paths | # coding: utf-8
import hashlib
import warnings
import logging
import io
import ssl
import socket
from itertools import chain
from mock import patch, Mock
import pytest
from urllib3 import add_stderr_logger, disable_warnings
from urllib3.util.request import make_headers, rewind_body, _FAILEDTELL
from urllib3.util.resp... | expected_url | modified | 9416665b8a773331e3b73b1c378480d5dcbc09cfc2103722317f9e042269932d | assert|test_parse_and_normalize_url_paths|# coding: utf-8 import hashlib import warnings import logging import io import ssl import socket from itertools import chain from mock import patch, Mock import pytest from urllib3 import add_stderr_logger, disable_warnings from urllib3.util.request import make_headers, rewind_... | expected_url.url | 328 | 8 |
urllib3/urllib3 | train | 318 | 9167b58128dbfe3ddcbab253166697348d8d364c | train | test/test_util.py | train | urllib3/urllib3:test/test_util.py | 555 | 8 | assert | test_add_stderr_logger | # coding: utf-8
import hashlib
import warnings
import logging
import io
import ssl
import socket
from itertools import chain
from mock import patch, Mock
import pytest
from urllib3 import add_stderr_logger, disable_warnings
from urllib3.util.request import make_headers, rewind_body, _FAILEDTELL
from urllib3.util.resp... | logger.handlers | added | c133f3e8f70157a94ac80ab1f3117aeaf58b9d71c3121eb7f544e5dbadf2a490 | assert|test_add_stderr_logger|# coding: utf-8 import hashlib import warnings import logging import io import ssl import socket from itertools import chain from mock import patch, Mock import pytest from urllib3 import add_stderr_logger, disable_warnings from urllib3.util.request import make_headers, rewind_body, _FAILE... | null | null | null |
urllib3/urllib3 | train | 318 | 9167b58128dbfe3ddcbab253166697348d8d364c | train | test/test_util.py | train | urllib3/urllib3:test/test_util.py | 696 | 8 | assert | test_is_fp_closed_object_has_none_fp | # coding: utf-8
import hashlib
import warnings
import logging
import io
import ssl
import socket
from itertools import chain
from mock import patch, Mock
import pytest
from urllib3 import add_stderr_logger, disable_warnings
from urllib3.util.request import make_headers, rewind_body, _FAILEDTELL
from urllib3.util.resp... | is_fp_closed(NoneFpFile()) | added | a828ee3a2906fe9afa0d62e15093b0b8a853bce8888ec2e097b59661754ba6d9 | assert|test_is_fp_closed_object_has_none_fp|# coding: utf-8 import hashlib import warnings import logging import io import ssl import socket from itertools import chain from mock import patch, Mock import pytest from urllib3 import add_stderr_logger, disable_warnings from urllib3.util.request import make_headers, rewin... | null | null | null |
urllib3/urllib3 | train | 318 | 9167b58128dbfe3ddcbab253166697348d8d364c | train | test/test_util.py | train | urllib3/urllib3:test/test_util.py | 789 | 16 | assert | test_has_ipv6_enabled_but_fails | # coding: utf-8
import hashlib
import warnings
import logging
import io
import ssl
import socket
from itertools import chain
from mock import patch, Mock
import pytest
from urllib3 import add_stderr_logger, disable_warnings
from urllib3.util.request import make_headers, rewind_body, _FAILEDTELL
from urllib3.util.resp... | not _has_ipv6("::1") | added | 001c2344f77c38c53a1647f50e42b43cab483b8579fe9755a3f90ec0d81ba5d8 | assert|test_has_ipv6_enabled_but_fails|# coding: utf-8 import hashlib import warnings import logging import io import ssl import socket from itertools import chain from mock import patch, Mock import pytest from urllib3 import add_stderr_logger, disable_warnings from urllib3.util.request import make_headers, rewind_bod... | null | null | null |
urllib3/urllib3 | train | 319 | 4a6c28838c1fa132035142738029b449ce4585ae | train | test/test_response.py | train | urllib3/urllib3:test/test_response.py | 385 | 13 | pytest.raises | test_io_not_autoclose_bufferedreader | # -*- coding: utf-8 -*-
import re
import socket
import zlib
from io import BytesIO, BufferedReader, TextIOWrapper
import pytest
import mock
import six
from urllib3.response import HTTPResponse, brotli
from urllib3.exceptions import (
DecodeError,
ResponseNotChunked,
ProtocolError,
InvalidHeader,
)
f... | StopIteration) | modified | 447eb430df4fb7c72c6d6ac05fa632e17367b8d721e3e6b492a585589f73b7a6 | pytest.raises|test_io_not_autoclose_bufferedreader|# -*- coding: utf-8 -*- import re import socket import zlib from io import BytesIO, BufferedReader, TextIOWrapper import pytest import mock import six from urllib3.response import HTTPResponse, brotli from urllib3.exceptions import ( DecodeError, ResponseNotChunked, Pr... | StopIteration) | 384 | 13 |
urllib3/urllib3 | train | 319 | 4a6c28838c1fa132035142738029b449ce4585ae | train | test/test_response.py | train | urllib3/urllib3:test/test_response.py | 501 | 8 | assert | test_gzipped_streaming_tell | # -*- coding: utf-8 -*-
import re
import socket
import zlib
from io import BytesIO, BufferedReader, TextIOWrapper
import pytest
import mock
import six
from urllib3.response import HTTPResponse, brotli
from urllib3.exceptions import (
DecodeError,
ResponseNotChunked,
ProtocolError,
InvalidHeader,
)
f... | uncompressed_data | modified | 79588e824ad273d0ff8fc6ac8e4e3f3c9ae3bdf855938dd16f66f2a9b9e843e8 | assert|test_gzipped_streaming_tell|# -*- coding: utf-8 -*- import re import socket import zlib from io import BytesIO, BufferedReader, TextIOWrapper import pytest import mock import six from urllib3.response import HTTPResponse, brotli from urllib3.exceptions import ( DecodeError, ResponseNotChunked, ProtocolError, Inv... | uncompressed_data | 500 | 8 |
urllib3/urllib3 | train | 319 | 4a6c28838c1fa132035142738029b449ce4585ae | train | test/test_ssl.py | train | urllib3/urllib3:test/test_ssl.py | 29 | 4 | assert | test_is_ipaddress_true | import platform
import sys
import mock
import pytest
from urllib3.util import ssl_
from urllib3.exceptions import SNIMissingWarning
@pytest.mark.parametrize(
"addr",
[
# IPv6
"::1",
"::",
"FE80::8939:7684:D84b:a5A4%251",
# IPv4
"127.0.0.1",
"8.8.8.8",
... | ssl_.is_ipaddress(addr) | modified | 193394f8966937a57a9c5ea76c48e49bf7cfaf8c3d76d76a658e50d402d635ed | assert|test_is_ipaddress_true|import platform import sys import mock import pytest from urllib3.util import ssl_ from urllib3.exceptions import SNIMissingWarning @pytest.mark.parametrize( "addr", [ # IPv6 "::1", "::", "FE80::8939:7684:D84b:a5A4%251", # IPv4 "127.0.0.1", "8.8.8.8", b"127.0.0.1", # IPv6 w/ Zone IDs "FE80... | ssl_.is_ipaddress(addr) | 26 | 4 |
urllib3/urllib3 | train | 319 | 4a6c28838c1fa132035142738029b449ce4585ae | train | test/test_ssl.py | train | urllib3/urllib3:test/test_ssl.py | 42 | 4 | assert | test_is_ipaddress_false | import platform
import sys
import mock
import pytest
from urllib3.util import ssl_
from urllib3.exceptions import SNIMissingWarning
@pytest.mark.parametrize(
"addr",
[
# IPv6
"::1",
"::",
"FE80::8939:7684:D84b:a5A4%251",
# IPv4
"127.0.0.1",
"8.8.8.8",
... | not ssl_.is_ipaddress(addr) | modified | 9f456ad797c4bd70e04f7c55703e21eccd9721ec01ea36261a1d8c6ac22c9cfc | assert|test_is_ipaddress_false|import platform import sys import mock import pytest from urllib3.util import ssl_ from urllib3.exceptions import SNIMissingWarning @pytest.mark.parametrize( "addr", [ # IPv6 "::1", "::", "FE80::8939:7684:D84b:a5A4%251", # IPv4 "127.0.0.1", "8.8.8.8", b"127.0.0.1", # IPv6 w/ Zone IDs "FE8... | not ssl_.is_ipaddress(addr) | 39 | 4 |
urllib3/urllib3 | train | 319 | 4a6c28838c1fa132035142738029b449ce4585ae | train | test/test_ssl.py | train | urllib3/urllib3:test/test_ssl.py | 170 | 4 | assert | test_create_urllib3_context_pha | import platform
import sys
import mock
import pytest
from urllib3.util import ssl_
from urllib3.exceptions import SNIMissingWarning
@pytest.mark.parametrize(
"addr",
[
# IPv6
"::1",
"::",
"FE80::8939:7684:D84b:a5A4%251",
# IPv4
"127.0.0.1",
"8.8.8.8",
... | context | added | c5e7ddf8c15b135a9b374ff76597381962c7a271c83eb8bfde9939e141f92ecb | assert|test_create_urllib3_context_pha|import platform import sys import mock import pytest from urllib3.util import ssl_ from urllib3.exceptions import SNIMissingWarning @pytest.mark.parametrize( "addr", [ # IPv6 "::1", "::", "FE80::8939:7684:D84b:a5A4%251", # IPv4 "127.0.0.1", "8.8.8.8", b"127.0.0.1", # IPv6 w/ Zone ... | null | null | null |
urllib3/urllib3 | train | 319 | 4a6c28838c1fa132035142738029b449ce4585ae | train | test/with_dummyserver/test_socketlevel.py | train | urllib3/urllib3:test/with_dummyserver/test_socketlevel.py | 97 | 12 | assert | test_hostname_in_first_request_packet | # TODO: Break this module up into pieces. Maybe group by functionality tested
# rather than the socket level-ness of it.
import platform
import sys
from urllib3 import HTTPConnectionPool, HTTPSConnectionPool
from urllib3.poolmanager import proxy_from_url
from urllib3.exceptions import (
MaxRetryError,
ProxyErr... | self.buf | modified | 94fbbd1f0ed59a1287c57a774ef1dd693cc6e228fc55a13d60299b746d10ab20 | assert|test_hostname_in_first_request_packet|# TODO: Break this module up into pieces. Maybe group by functionality tested # rather than the socket level-ness of it. import platform import sys from urllib3 import HTTPConnectionPool, HTTPSConnectionPool from urllib3.poolmanager import proxy_from_url from urllib3.excepti... | self.buf | 95 | 12 |
urllib3/urllib3 | train | 319 | 4a6c28838c1fa132035142738029b449ce4585ae | train | test/with_dummyserver/test_socketlevel.py | train | urllib3/urllib3:test/with_dummyserver/test_socketlevel.py | 1,435 | 12 | assert | test_httplib_headers_case_insensitive | # TODO: Break this module up into pieces. Maybe group by functionality tested
# rather than the socket level-ness of it.
import platform
import sys
from urllib3 import HTTPConnectionPool, HTTPSConnectionPool
from urllib3.poolmanager import proxy_from_url
from urllib3.exceptions import (
MaxRetryError,
ProxyErr... | dict(r.headers.items()) | added | 541fcf4de2a505b05770c095a4b9a14e9c2d5d60db3db0186f9b980826c87dbe | assert|test_httplib_headers_case_insensitive|# TODO: Break this module up into pieces. Maybe group by functionality tested # rather than the socket level-ness of it. import platform import sys from urllib3 import HTTPConnectionPool, HTTPSConnectionPool from urllib3.poolmanager import proxy_from_url from urllib3.excepti... | null | null | null |
urllib3/urllib3 | train | 319 | 4a6c28838c1fa132035142738029b449ce4585ae | train | test/with_dummyserver/test_socketlevel.py | train | urllib3/urllib3:test/with_dummyserver/test_socketlevel.py | 1,643 | 16 | assert | _test_okay_header_parsing | # TODO: Break this module up into pieces. Maybe group by functionality tested
# rather than the socket level-ness of it.
import platform
import sys
from urllib3 import HTTPConnectionPool, HTTPSConnectionPool
from urllib3.poolmanager import proxy_from_url
from urllib3.exceptions import (
MaxRetryError,
ProxyErr... | record.msg | added | 332a11b48c7042fb8f92896339613ef5018aa8642667ef898f462c23f5d5a815 | assert|_test_okay_header_parsing|# TODO: Break this module up into pieces. Maybe group by functionality tested # rather than the socket level-ness of it. import platform import sys from urllib3 import HTTPConnectionPool, HTTPSConnectionPool from urllib3.poolmanager import proxy_from_url from urllib3.exceptions import (... | null | null | null |
urllib3/urllib3 | train | 320 | 900d751903ff93c2e633f890f72c78d69b9818a0 | train | test/with_dummyserver/test_https.py | train | urllib3/urllib3:test/with_dummyserver/test_https.py | 365 | 16 | assert | test_unverified_ssl | import datetime
import json
import logging
import ssl
import sys
import warnings
import mock
import pytest
from dummyserver.testcase import HTTPSDummyServerTestCase, IPV6HTTPSDummyServerTestCase
from dummyserver.server import (
DEFAULT_CA,
DEFAULT_CA_BAD,
DEFAULT_CERTS,
DEFAULT_CLIENT_CERTS,
DEFAU... | warn.called | modified | 6a7d4f0c8bb310583ce2f8bce43bd3a73c2f1190dbf702641112c4374368406c | assert|test_unverified_ssl|import datetime import json import logging import ssl import sys import warnings import mock import pytest from dummyserver.testcase import HTTPSDummyServerTestCase, IPV6HTTPSDummyServerTestCase from dummyserver.server import ( DEFAULT_CA, DEFAULT_CA_BAD, DEFAULT_CERTS, DEFAULT_CLIENT_CERTS, ... | warn.called | 364 | 16 |
urllib3/urllib3 | train | 320 | 900d751903ff93c2e633f890f72c78d69b9818a0 | train | test/with_dummyserver/test_https.py | train | urllib3/urllib3:test/with_dummyserver/test_https.py | 432 | 16 | assert | test_server_hostname | import datetime
import json
import logging
import ssl
import sys
import warnings
import mock
import pytest
from dummyserver.testcase import HTTPSDummyServerTestCase, IPV6HTTPSDummyServerTestCase
from dummyserver.server import (
DEFAULT_CA,
DEFAULT_CA_BAD,
DEFAULT_CERTS,
DEFAULT_CLIENT_CERTS,
DEFAU... | "localhost" | modified | 92f6b769bed71fe1534e2f2272b98f3a8d82e42fd0197f14dde18fff87512171 | assert|test_server_hostname|import datetime import json import logging import ssl import sys import warnings import mock import pytest from dummyserver.testcase import HTTPSDummyServerTestCase, IPV6HTTPSDummyServerTestCase from dummyserver.server import ( DEFAULT_CA, DEFAULT_CA_BAD, DEFAULT_CERTS, DEFAULT_CLIENT_CERTS,... | "localhost" | 431 | 16 |
urllib3/urllib3 | train | 320 | 900d751903ff93c2e633f890f72c78d69b9818a0 | train | test/with_dummyserver/test_https.py | train | urllib3/urllib3:test/with_dummyserver/test_https.py | 477 | 21 | pytest.raises | _test_request | import datetime
import json
import logging
import ssl
import sys
import warnings
import mock
import pytest
from dummyserver.testcase import HTTPSDummyServerTestCase, IPV6HTTPSDummyServerTestCase
from dummyserver.server import (
DEFAULT_CA,
DEFAULT_CA_BAD,
DEFAULT_CERTS,
DEFAULT_CLIENT_CERTS,
DEFAU... | MaxRetryError) | modified | 745611b55f40fc3aba4eabdabd2f3905f9713f6d9092edc02d2fdab8ee911cd1 | pytest.raises|_test_request|import datetime import json import logging import ssl import sys import warnings import mock import pytest from dummyserver.testcase import HTTPSDummyServerTestCase, IPV6HTTPSDummyServerTestCase from dummyserver.server import ( DEFAULT_CA, DEFAULT_CA_BAD, DEFAULT_CERTS, DEFAULT_CLIENT_CERTS,... | MaxRetryError) | 476 | 21 |
urllib3/urllib3 | train | 320 | 900d751903ff93c2e633f890f72c78d69b9818a0 | train | test/with_dummyserver/test_https.py | train | urllib3/urllib3:test/with_dummyserver/test_https.py | 745 | 16 | assert | test_warning_for_certs_without_a_san | import datetime
import json
import logging
import ssl
import sys
import warnings
import mock
import pytest
from dummyserver.testcase import HTTPSDummyServerTestCase, IPV6HTTPSDummyServerTestCase
from dummyserver.server import (
DEFAULT_CA,
DEFAULT_CA_BAD,
DEFAULT_CERTS,
DEFAULT_CLIENT_CERTS,
DEFAU... | warn.called | modified | cd8ee3f82eb79a1bd60ae61de588409696d5431ea914077203cf46e3b01f7ce1 | assert|test_warning_for_certs_without_a_san|import datetime import json import logging import ssl import sys import warnings import mock import pytest from dummyserver.testcase import HTTPSDummyServerTestCase, IPV6HTTPSDummyServerTestCase from dummyserver.server import ( DEFAULT_CA, DEFAULT_CA_BAD, DEFAULT_CERTS, DEFAU... | warn.called | 744 | 16 |
urllib3/urllib3 | train | 321 | d369183f60749d735f0676efb22ecd64fc694768 | train | test/test_connection.py | test | urllib3/urllib3:test/test_connection.py | 39 | 12 | assert_* | test_match_hostname_mismatch | import datetime
import mock
import pytest
from urllib3.connection import CertificateError, _match_hostname, RECENT_DATE
class TestConnection(object):
"""
Tests in this suite should not make any network requests or connections.
"""
def test_match_hostname_no_cert(self):
cert = None
a... | {"subjectAltName": [("DNS", "foo")]}) | modified | dae511188e30ba53bd149c3fd8743f4085449a9152efd730024ebc7463c49c48 | assert_*|test_match_hostname_mismatch|import datetime import mock import pytest from urllib3.connection import CertificateError, _match_hostname, RECENT_DATE class TestConnection(object): """ Tests in this suite should not make any network requests or connections. """ def test_match_hostname_no_cert(self): cert = None ... | {"subjectAltName": [("DNS", "foo")]}) | 39 | 12 |
urllib3/urllib3 | train | 321 | d369183f60749d735f0676efb22ecd64fc694768 | train | test/test_connection.py | test | urllib3/urllib3:test/test_connection.py | 52 | 8 | assert | test_recent_date | import datetime
import mock
import pytest
from urllib3.connection import CertificateError, _match_hostname, RECENT_DATE
class TestConnection(object):
"""
Tests in this suite should not make any network requests or connections.
"""
def test_match_hostname_no_cert(self):
cert = None
a... | (datetime.datetime.today() - two_years).date() | modified | 4be25d2e0e2bf0f342d81a29388ed0d0ddc235c250dbd9a1e25f0e2358476d8a | assert|test_recent_date|import datetime import mock import pytest from urllib3.connection import CertificateError, _match_hostname, RECENT_DATE class TestConnection(object): """ Tests in this suite should not make any network requests or connections. """ def test_match_hostname_no_cert(self): cert = None asserted_hostn... | (datetime.datetime.today() - two_years).date() | 52 | 8 |
urllib3/urllib3 | train | 321 | d369183f60749d735f0676efb22ecd64fc694768 | train | test/with_dummyserver/test_https.py | train | urllib3/urllib3:test/with_dummyserver/test_https.py | 334 | 16 | assert | test_verified_without_ca_certs | import datetime
import json
import logging
import ssl
import sys
import warnings
import mock
import pytest
from dummyserver.testcase import HTTPSDummyServerTestCase, IPV6HTTPSDummyServerTestCase
from dummyserver.server import (
DEFAULT_CA,
DEFAULT_CA_BAD,
DEFAULT_CERTS,
DEFAULT_CLIENT_CERTS,
DEFAU... | isinstance(e.reason, SSLError) | modified | f86665e4e1c8565d69ecf3eacb6735222db4dfe62f0f55a00604b2db9f090802 | assert|test_verified_without_ca_certs|import datetime import json import logging import ssl import sys import warnings import mock import pytest from dummyserver.testcase import HTTPSDummyServerTestCase, IPV6HTTPSDummyServerTestCase from dummyserver.server import ( DEFAULT_CA, DEFAULT_CA_BAD, DEFAULT_CERTS, DEFAULT_CLI... | isinstance(e.reason, SSLError) | 334 | 16 |
urllib3/urllib3 | train | 321 | d369183f60749d735f0676efb22ecd64fc694768 | train | test/with_dummyserver/test_https.py | train | urllib3/urllib3:test/with_dummyserver/test_https.py | 503 | 12 | assert | test_verify_none_and_bad_fingerprint | import datetime
import json
import logging
import ssl
import sys
import warnings
import mock
import pytest
from dummyserver.testcase import HTTPSDummyServerTestCase, IPV6HTTPSDummyServerTestCase
from dummyserver.server import (
DEFAULT_CA,
DEFAULT_CA_BAD,
DEFAULT_CERTS,
DEFAULT_CLIENT_CERTS,
DEFAU... | isinstance(cm.value.reason, SSLError) | modified | c52f2f89b1cb78e0e005a0380ba8c7c4406b7e98e90255dc76bddd7c7f874fea | assert|test_verify_none_and_bad_fingerprint|import datetime import json import logging import ssl import sys import warnings import mock import pytest from dummyserver.testcase import HTTPSDummyServerTestCase, IPV6HTTPSDummyServerTestCase from dummyserver.server import ( DEFAULT_CA, DEFAULT_CA_BAD, DEFAULT_CERTS, DEFAU... | isinstance(cm.value.reason, SSLError) | 503 | 12 |
urllib3/urllib3 | train | 321 | d369183f60749d735f0676efb22ecd64fc694768 | train | test/with_dummyserver/test_proxy_poolmanager.py | train | urllib3/urllib3:test/with_dummyserver/test_proxy_poolmanager.py | 99 | 12 | assert | test_proxy_verified | import json
import socket
import pytest
from dummyserver.testcase import HTTPDummyProxyTestCase, IPv6HTTPDummyProxyTestCase
from dummyserver.server import DEFAULT_CA, DEFAULT_CA_BAD, get_unreachable_address
from .. import TARPIT_HOST, requires_network
from urllib3._collections import HTTPHeaderDict
from urllib3.pool... | VerifiedHTTPSConnection | modified | 26a8d15815d1438181fcd9c1ee3b3f047c2394edf4807eaefecbca3dac570cab | assert|test_proxy_verified|import json import socket import pytest from dummyserver.testcase import HTTPDummyProxyTestCase, IPv6HTTPDummyProxyTestCase from dummyserver.server import DEFAULT_CA, DEFAULT_CA_BAD, get_unreachable_address from .. import TARPIT_HOST, requires_network from urllib3._collections import HTTPHead... | VerifiedHTTPSConnection | 99 | 12 |
urllib3/urllib3 | train | 321 | d369183f60749d735f0676efb22ecd64fc694768 | train | test/with_dummyserver/test_proxy_poolmanager.py | train | urllib3/urllib3:test/with_dummyserver/test_proxy_poolmanager.py | 294 | 12 | assert | test_headerdict | import json
import socket
import pytest
from dummyserver.testcase import HTTPDummyProxyTestCase, IPv6HTTPDummyProxyTestCase
from dummyserver.server import DEFAULT_CA, DEFAULT_CA_BAD, get_unreachable_address
from .. import TARPIT_HOST, requires_network
from urllib3._collections import HTTPHeaderDict
from urllib3.pool... | "quux" | modified | 226bc6daefa11a898cebb1b8b3229e940867648e815238400e56e23d3ba5beea | assert|test_headerdict|import json import socket import pytest from dummyserver.testcase import HTTPDummyProxyTestCase, IPv6HTTPDummyProxyTestCase from dummyserver.server import DEFAULT_CA, DEFAULT_CA_BAD, get_unreachable_address from .. import TARPIT_HOST, requires_network from urllib3._collections import HTTPHeaderDi... | "quux" | 294 | 12 |
urllib3/urllib3 | train | 321 | d369183f60749d735f0676efb22ecd64fc694768 | train | test/with_dummyserver/test_socketlevel.py | train | urllib3/urllib3:test/with_dummyserver/test_socketlevel.py | 1,162 | 17 | pytest.raises | test_ssl_failure_midway_through_conn | # TODO: Break this module up into pieces. Maybe group by functionality tested
# rather than the socket level-ness of it.
import platform
import sys
from urllib3 import HTTPConnectionPool, HTTPSConnectionPool
from urllib3.poolmanager import proxy_from_url
from urllib3.exceptions import (
MaxRetryError,
ProxyErr... | MaxRetryError) | modified | dc8875561588424cb7a2c1b29493d83db2f41bbbd9bbc32d95ec72ab7968ed97 | pytest.raises|test_ssl_failure_midway_through_conn|# TODO: Break this module up into pieces. Maybe group by functionality tested # rather than the socket level-ness of it. import platform import sys from urllib3 import HTTPConnectionPool, HTTPSConnectionPool from urllib3.poolmanager import proxy_from_url from urllib3.e... | MaxRetryError) | 1,162 | 17 |
urllib3/urllib3 | train | 321 | d369183f60749d735f0676efb22ecd64fc694768 | train | test/with_dummyserver/test_socketlevel.py | train | urllib3/urllib3:test/with_dummyserver/test_socketlevel.py | 1,704 | 12 | assert | 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.
import platform
import sys
from urllib3 import HTTPConnectionPool, HTTPSConnectionPool
from urllib3.poolmanager import proxy_from_url
from urllib3.exceptions import (
MaxRetryError,
ProxyErr... | list(r.stream(None)) | modified | 8331b321135cb8130a62d0a773b2b459eb66f427eb247c7bb13d408e843de455 | assert|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. import platform import sys from urllib3 import HTTPConnectionPool, HTTPSConnectionPool from urllib3.poolmanager import proxy_from_url from url... | list(r.stream(None)) | 1,706 | 12 |
urllib3/urllib3 | train | 322 | b9c77a5d8fdd9fdd214b1ee25d455c012b8ab85e | train | test/test_no_ssl.py | train | urllib3/urllib3:test/test_no_ssl.py | 82 | 13 | pytest.raises | test_cannot_import_ssl | """
Test what happens if Python was built without SSL
* Everything that does not involve HTTPS should still work
* HTTPS requests must fail with an error that points at the ssl module
"""
import sys
import pytest
class ImportBlocker(object):
"""
Block Imports
To be placed on ``sys.meta_path``. This ens... | ImportError) | modified | 7e2c5e0ed44dd9f50fb14b4725a202284ffb8cae61856b3bef862b6f937fbeb4 | pytest.raises|test_cannot_import_ssl|""" Test what happens if Python was built without SSL * Everything that does not involve HTTPS should still work * HTTPS requests must fail with an error that points at the ssl module """ import sys import pytest class ImportBlocker(object): """ Block Imports To be placed on ``sys.m... | ImportError) | 82 | 13 |
urllib3/urllib3 | train | 322 | b9c77a5d8fdd9fdd214b1ee25d455c012b8ab85e | train | test/with_dummyserver/test_poolmanager.py | train | urllib3/urllib3:test/with_dummyserver/test_poolmanager.py | 38 | 12 | assert | test_redirect | import json
import pytest
from dummyserver.server import HAS_IPV6
from dummyserver.testcase import HTTPDummyServerTestCase, IPv6HTTPDummyServerTestCase
from urllib3.poolmanager import PoolManager
from urllib3.connectionpool import port_by_scheme
from urllib3.exceptions import MaxRetryError
from urllib3.util.retry imp... | b"Dummy server!" | modified | ba047d7d2addbbb1ec81d92109b0edceba64e80529452056b2df6100a26bb424 | assert|test_redirect|import json import pytest from dummyserver.server import HAS_IPV6 from dummyserver.testcase import HTTPDummyServerTestCase, IPv6HTTPDummyServerTestCase from urllib3.poolmanager import PoolManager from urllib3.connectionpool import port_by_scheme from urllib3.exceptions import MaxRetryError from url... | b"Dummy server!" | 38 | 12 |
urllib3/urllib3 | train | 322 | b9c77a5d8fdd9fdd214b1ee25d455c012b8ab85e | train | test/with_dummyserver/test_poolmanager.py | train | urllib3/urllib3:test/with_dummyserver/test_poolmanager.py | 61 | 12 | assert | test_redirect_twice | import json
import pytest
from dummyserver.server import HAS_IPV6
from dummyserver.testcase import HTTPDummyServerTestCase, IPv6HTTPDummyServerTestCase
from urllib3.poolmanager import PoolManager
from urllib3.connectionpool import port_by_scheme
from urllib3.exceptions import MaxRetryError
from urllib3.util.retry imp... | b"Dummy server!" | modified | 8d5b480fca8df552aa74bc00dbe41ffdfb539f8452bba730e6064587e23c7536 | assert|test_redirect_twice|import json import pytest from dummyserver.server import HAS_IPV6 from dummyserver.testcase import HTTPDummyServerTestCase, IPv6HTTPDummyServerTestCase from urllib3.poolmanager import PoolManager from urllib3.connectionpool import port_by_scheme from urllib3.exceptions import MaxRetryError fr... | b"Dummy server!" | 61 | 12 |
urllib3/urllib3 | train | 322 | b9c77a5d8fdd9fdd214b1ee25d455c012b8ab85e | train | test/with_dummyserver/test_poolmanager.py | train | urllib3/urllib3:test/with_dummyserver/test_poolmanager.py | 160 | 12 | assert | test_redirect_cross_host_remove_headers | import json
import pytest
from dummyserver.server import HAS_IPV6
from dummyserver.testcase import HTTPDummyServerTestCase, IPv6HTTPDummyServerTestCase
from urllib3.poolmanager import PoolManager
from urllib3.connectionpool import port_by_scheme
from urllib3.exceptions import MaxRetryError
from urllib3.util.retry imp... | data | modified | d3a5939b2c053161fa13d7141264f40910681ded58873af5d8d91c6d2ef368d3 | assert|test_redirect_cross_host_remove_headers|import json import pytest from dummyserver.server import HAS_IPV6 from dummyserver.testcase import HTTPDummyServerTestCase, IPv6HTTPDummyServerTestCase from urllib3.poolmanager import PoolManager from urllib3.connectionpool import port_by_scheme from urllib3.exceptions imp... | data | 160 | 12 |
urllib3/urllib3 | train | 322 | b9c77a5d8fdd9fdd214b1ee25d455c012b8ab85e | train | test/with_dummyserver/test_poolmanager.py | train | urllib3/urllib3:test/with_dummyserver/test_poolmanager.py | 191 | 12 | assert | test_redirect_cross_host_no_remove_headers | import json
import pytest
from dummyserver.server import HAS_IPV6
from dummyserver.testcase import HTTPDummyServerTestCase, IPv6HTTPDummyServerTestCase
from urllib3.poolmanager import PoolManager
from urllib3.connectionpool import port_by_scheme
from urllib3.exceptions import MaxRetryError
from urllib3.util.retry imp... | "foo" | modified | 1222990b57a957ab638d00b851803713de4c76f83db9c7a7d7c2ff79d2bb09cf | assert|test_redirect_cross_host_no_remove_headers|import json import pytest from dummyserver.server import HAS_IPV6 from dummyserver.testcase import HTTPDummyServerTestCase, IPv6HTTPDummyServerTestCase from urllib3.poolmanager import PoolManager from urllib3.connectionpool import port_by_scheme from urllib3.exceptions ... | "foo" | 191 | 12 |
urllib3/urllib3 | train | 322 | b9c77a5d8fdd9fdd214b1ee25d455c012b8ab85e | train | test/with_dummyserver/test_proxy_poolmanager.py | train | urllib3/urllib3:test/with_dummyserver/test_proxy_poolmanager.py | 159 | 12 | assert | test_cross_host_redirect | import json
import socket
import pytest
from dummyserver.testcase import HTTPDummyProxyTestCase, IPv6HTTPDummyProxyTestCase
from dummyserver.server import DEFAULT_CA, DEFAULT_CA_BAD, get_unreachable_address
from .. import TARPIT_HOST, requires_network
from urllib3._collections import HTTPHeaderDict
from urllib3.pool... | self.http_host_alt | modified | 6076c21de2aacbe668e8428518dc0a3c31955c3772425977171ddd4ec1b17350 | assert|test_cross_host_redirect|import json import socket import pytest from dummyserver.testcase import HTTPDummyProxyTestCase, IPv6HTTPDummyProxyTestCase from dummyserver.server import DEFAULT_CA, DEFAULT_CA_BAD, get_unreachable_address from .. import TARPIT_HOST, requires_network from urllib3._collections import HTT... | self.http_host_alt | 159 | 12 |
urllib3/urllib3 | train | 322 | b9c77a5d8fdd9fdd214b1ee25d455c012b8ab85e | train | test/with_dummyserver/test_proxy_poolmanager.py | train | urllib3/urllib3:test/with_dummyserver/test_proxy_poolmanager.py | 185 | 12 | assert | test_cross_protocol_redirect | import json
import socket
import pytest
from dummyserver.testcase import HTTPDummyProxyTestCase, IPv6HTTPDummyProxyTestCase
from dummyserver.server import DEFAULT_CA, DEFAULT_CA_BAD, get_unreachable_address
from .. import TARPIT_HOST, requires_network
from urllib3._collections import HTTPHeaderDict
from urllib3.pool... | self.https_host | modified | 01bdd21cafa8f6908b3ecd9cba1a78e1095345ac9896f521ac46ad8d8e7c43f8 | assert|test_cross_protocol_redirect|import json import socket import pytest from dummyserver.testcase import HTTPDummyProxyTestCase, IPv6HTTPDummyProxyTestCase from dummyserver.server import DEFAULT_CA, DEFAULT_CA_BAD, get_unreachable_address from .. import TARPIT_HOST, requires_network from urllib3._collections import... | self.https_host | 185 | 12 |
urllib3/urllib3 | train | 322 | b9c77a5d8fdd9fdd214b1ee25d455c012b8ab85e | train | test/with_dummyserver/test_proxy_poolmanager.py | train | urllib3/urllib3:test/with_dummyserver/test_proxy_poolmanager.py | 216 | 12 | assert | test_headers | import json
import socket
import pytest
from dummyserver.testcase import HTTPDummyProxyTestCase, IPv6HTTPDummyProxyTestCase
from dummyserver.server import DEFAULT_CA, DEFAULT_CA_BAD, get_unreachable_address
from .. import TARPIT_HOST, requires_network
from urllib3._collections import HTTPHeaderDict
from urllib3.pool... | None | modified | e575fa802fe09e0e1350b5e47d2c673d9e41365c9fa5c8ad8bf126d1f41f843e | assert|test_headers|import json import socket import pytest from dummyserver.testcase import HTTPDummyProxyTestCase, IPv6HTTPDummyProxyTestCase from dummyserver.server import DEFAULT_CA, DEFAULT_CA_BAD, get_unreachable_address from .. import TARPIT_HOST, requires_network from urllib3._collections import HTTPHeaderDict ... | None | 216 | 12 |
urllib3/urllib3 | train | 323 | cef15a1f597a35f15c688c8998e96c7a27e9e0a6 | train | test/contrib/test_securetransport.py | train | urllib3/urllib3:test/contrib/test_securetransport.py | 50 | 13 | pytest.raises | test_no_crash_with_empty_trust_bundle | # -*- coding: utf-8 -*-
import contextlib
import socket
import ssl
import pytest
try:
from urllib3.contrib.securetransport import WrappedSocket
except ImportError:
pass
def setup_module():
try:
from urllib3.contrib.securetransport import inject_into_urllib3
inject_into_urllib3()
exc... | ssl.SSLError) | modified | 87886b9b410a8ce5890c78a94dac83aca19bbc685500afcd73cef44c5853c3a8 | pytest.raises|test_no_crash_with_empty_trust_bundle|# -*- coding: utf-8 -*- import contextlib import socket import ssl import pytest try: from urllib3.contrib.securetransport import WrappedSocket except ImportError: pass def setup_module(): try: from urllib3.contrib.securetransport import inject_into_urllib3 inject_int... | ssl.SSLError) | 51 | 13 |
urllib3/urllib3 | train | 324 | 31db28210facc24b96afecbc3b41588d0dc6fded | train | dummyserver/testcase.py | train | urllib3/urllib3:dummyserver/testcase.py | 89 | 16 | assert | import threading
import pytest
from tornado import ioloop, web
from dummyserver.server import (
SocketServerThread,
run_tornado_app,
run_loop_in_thread,
DEFAULT_CERTS,
HAS_IPV6,
)
from dummyserver.handlers import TestingApp
from dummyserver.proxy import ProxyHandler
def consume_socket(sock, chun... | expected_value | added | dc385956144d9483bb3eb95a3f4bb2019ff62c1499ebcdeed0cba34e0c366e6e | assert||import threading import pytest from tornado import ioloop, web from dummyserver.server import ( SocketServerThread, run_tornado_app, run_loop_in_thread, DEFAULT_CERTS, HAS_IPV6, ) from dummyserver.handlers import TestingApp from dummyserver.proxy import ProxyHandler def consume_socket(sock, chunks=65536): consu... | null | null | null | |
urllib3/urllib3 | train | 324 | 31db28210facc24b96afecbc3b41588d0dc6fded | train | dummyserver/testcase.py | train | urllib3/urllib3:dummyserver/testcase.py | 90 | 8 | assert | import threading
import pytest
from tornado import ioloop, web
from dummyserver.server import (
SocketServerThread,
run_tornado_app,
run_loop_in_thread,
DEFAULT_CERTS,
HAS_IPV6,
)
from dummyserver.handlers import TestingApp
from dummyserver.proxy import ProxyHandler
def consume_socket(sock, chun... | header_titles | added | 567528403fbd4b84a88b03e7096279f5caf0f1eb633c952745877642410c1f1b | assert||import threading import pytest from tornado import ioloop, web from dummyserver.server import ( SocketServerThread, run_tornado_app, run_loop_in_thread, DEFAULT_CERTS, HAS_IPV6, ) from dummyserver.handlers import TestingApp from dummyserver.proxy import ProxyHandler def consume_socket(sock, chunks=65536): consu... | null | null | null | |
urllib3/urllib3 | train | 324 | 31db28210facc24b96afecbc3b41588d0dc6fded | train | test/with_dummyserver/test_chunked_transfer.py | train | urllib3/urllib3:test/with_dummyserver/test_chunked_transfer.py | 34 | 12 | assert | test_chunks | # -*- coding: utf-8 -*-
from urllib3 import HTTPConnectionPool
from urllib3.util.retry import Retry
from dummyserver.testcase import SocketDummyServerTestCase, consume_socket
class TestChunkedTransfer(SocketDummyServerTestCase):
def start_chunked_handler(self):
self.buffer = b""
def socket_handl... | self.buffer | modified | 3e65494b668d5b3aa0a870c48a6e7ac01cc1a80fd9dbbf191c0471d60df329e1 | assert|test_chunks|# -*- coding: utf-8 -*- from urllib3 import HTTPConnectionPool from urllib3.util.retry import Retry from dummyserver.testcase import SocketDummyServerTestCase, consume_socket class TestChunkedTransfer(SocketDummyServerTestCase): def start_chunked_handler(self): self.buffer = b"" def socket_handler(li... | self.buffer | 33 | 12 |
urllib3/urllib3 | train | 324 | 31db28210facc24b96afecbc3b41588d0dc6fded | train | test/with_dummyserver/test_chunked_transfer.py | train | urllib3/urllib3:test/with_dummyserver/test_chunked_transfer.py | 40 | 16 | assert | test_chunks | # -*- coding: utf-8 -*-
from urllib3 import HTTPConnectionPool
from urllib3.util.retry import Retry
from dummyserver.testcase import SocketDummyServerTestCase, consume_socket
class TestChunkedTransfer(SocketDummyServerTestCase):
def start_chunked_handler(self):
self.buffer = b""
def socket_handl... | hex(len(chunk))[2:].encode("utf-8") | modified | f6a473cd447be803f4eaa14185ce6361a4d52a80c085ca31541c7a72113f3e6e | assert|test_chunks|# -*- coding: utf-8 -*- from urllib3 import HTTPConnectionPool from urllib3.util.retry import Retry from dummyserver.testcase import SocketDummyServerTestCase, consume_socket class TestChunkedTransfer(SocketDummyServerTestCase): def start_chunked_handler(self): self.buffer = b"" def socket_handler(li... | hex(len(chunk))[2:].encode("utf-8") | 39 | 16 |
urllib3/urllib3 | train | 324 | 31db28210facc24b96afecbc3b41588d0dc6fded | train | test/with_dummyserver/test_chunked_transfer.py | train | urllib3/urllib3:test/with_dummyserver/test_chunked_transfer.py | 53 | 16 | assert | _test_body | # -*- coding: utf-8 -*-
from urllib3 import HTTPConnectionPool
from urllib3.util.retry import Retry
from dummyserver.testcase import SocketDummyServerTestCase, consume_socket
class TestChunkedTransfer(SocketDummyServerTestCase):
def start_chunked_handler(self):
self.buffer = b""
def socket_handl... | body.endswith(b"\r\n0\r\n\r\n") | modified | 7252962d69dbe0fe4c798fe3703d03ef9a76ce38c2c9fae89be4f428637d0218 | assert|_test_body|# -*- coding: utf-8 -*- from urllib3 import HTTPConnectionPool from urllib3.util.retry import Retry from dummyserver.testcase import SocketDummyServerTestCase, consume_socket class TestChunkedTransfer(SocketDummyServerTestCase): def start_chunked_handler(self): self.buffer = b"" def socket_handler(lis... | body.endswith(b"\r\n0\r\n\r\n") | 52 | 16 |
urllib3/urllib3 | train | 324 | 31db28210facc24b96afecbc3b41588d0dc6fded | train | test/with_dummyserver/test_chunked_transfer.py | train | urllib3/urllib3:test/with_dummyserver/test_chunked_transfer.py | 59 | 16 | assert | _test_body | # -*- coding: utf-8 -*-
from urllib3 import HTTPConnectionPool
from urllib3.util.retry import Retry
from dummyserver.testcase import SocketDummyServerTestCase, consume_socket
class TestChunkedTransfer(SocketDummyServerTestCase):
def start_chunked_handler(self):
self.buffer = b""
def socket_handl... | b"0\r\n\r\n" | modified | f9b813dc4c3f0569c411eb899ce7c587871f51359c5721a9f4eef250bf7a4072 | assert|_test_body|# -*- coding: utf-8 -*- from urllib3 import HTTPConnectionPool from urllib3.util.retry import Retry from dummyserver.testcase import SocketDummyServerTestCase, consume_socket class TestChunkedTransfer(SocketDummyServerTestCase): def start_chunked_handler(self): self.buffer = b"" def socket_handler(lis... | b"0\r\n\r\n" | 58 | 16 |
urllib3/urllib3 | train | 325 | 15e64de5a67a87f5350538cff1f011cb03ffde03 | train | test/with_dummyserver/test_chunked_transfer.py | train | urllib3/urllib3:test/with_dummyserver/test_chunked_transfer.py | 46 | 16 | assert | test_chunks | # -*- coding: utf-8 -*-
import pytest
from urllib3 import HTTPConnectionPool
from urllib3.util.retry import Retry
from dummyserver.testcase import SocketDummyServerTestCase, consume_socket
# Retry failed tests
pytestmark = pytest.mark.flaky
class TestChunkedTransfer(SocketDummyServerTestCase):
def start_chunke... | chunk.encode("utf-8") | added | 2820cb1449740136e69d0f64efd57a1f7ea2886d16a8db89ca9cdad39af740d6 | assert|test_chunks|# -*- coding: utf-8 -*- import pytest from urllib3 import HTTPConnectionPool from urllib3.util.retry import Retry from dummyserver.testcase import SocketDummyServerTestCase, consume_socket # Retry failed tests pytestmark = pytest.mark.flaky class TestChunkedTransfer(SocketDummyServerTestCase): def st... | null | null | null |
urllib3/urllib3 | train | 325 | 15e64de5a67a87f5350538cff1f011cb03ffde03 | train | test/with_dummyserver/test_connectionpool.py | train | urllib3/urllib3:test/with_dummyserver/test_connectionpool.py | 476 | 12 | assert | test_keepalive_close | import io
import logging
import socket
import sys
import time
import warnings
import pytest
import mock
from .. import TARPIT_HOST, VALID_SOURCE_ADDRESSES, INVALID_SOURCE_ADDRESSES
from ..port_helpers import find_unused_port
from urllib3 import encode_multipart_formdata, HTTPConnectionPool
from urllib3.exceptions imp... | None | modified | 4e861374cd2711f24e81ed87bcc69d3e365c5d07cb1968ef3bcff94b9b12bd4f | assert|test_keepalive_close|import io import logging import socket import sys import time import warnings import pytest import mock from .. import TARPIT_HOST, VALID_SOURCE_ADDRESSES, INVALID_SOURCE_ADDRESSES from ..port_helpers import find_unused_port from urllib3 import encode_multipart_formdata, HTTPConnectionPool f... | None | 474 | 12 |
urllib3/urllib3 | train | 325 | 15e64de5a67a87f5350538cff1f011cb03ffde03 | train | test/with_dummyserver/test_https.py | train | urllib3/urllib3:test/with_dummyserver/test_https.py | 523 | 17 | pytest.raises | test_https_timeout | import datetime
import json
import logging
import ssl
import sys
import warnings
import mock
import pytest
from dummyserver.testcase import HTTPSDummyServerTestCase, IPV6HTTPSDummyServerTestCase
from dummyserver.server import (
DEFAULT_CA,
DEFAULT_CA_BAD,
DEFAULT_CERTS,
DEFAULT_CLIENT_CERTS,
DEFAU... | ConnectTimeoutError) | modified | f1f08993ad8e25d8f971cf847bdc5a41a335ae2fe9f53149150b883dc87dea58 | pytest.raises|test_https_timeout|import datetime import json import logging import ssl import sys import warnings import mock import pytest from dummyserver.testcase import HTTPSDummyServerTestCase, IPV6HTTPSDummyServerTestCase from dummyserver.server import ( DEFAULT_CA, DEFAULT_CA_BAD, DEFAULT_CERTS, DEFAULT_CLIENT_C... | ConnectTimeoutError) | 521 | 17 |
urllib3/urllib3 | train | 325 | 15e64de5a67a87f5350538cff1f011cb03ffde03 | train | test/with_dummyserver/test_poolmanager.py | train | urllib3/urllib3:test/with_dummyserver/test_poolmanager.py | 205 | 12 | assert | test_redirect_cross_host_set_removed_headers | import json
import pytest
from dummyserver.server import HAS_IPV6
from dummyserver.testcase import HTTPDummyServerTestCase, IPv6HTTPDummyServerTestCase
from urllib3.poolmanager import PoolManager
from urllib3.connectionpool import port_by_scheme
from urllib3.exceptions import MaxRetryError
from urllib3.util.retry imp... | "bar" | modified | a61d42eb857a2e2a4e6ffb991a8aab7224809cc2423156625b8b05c3d82347fa | assert|test_redirect_cross_host_set_removed_headers|import json import pytest from dummyserver.server import HAS_IPV6 from dummyserver.testcase import HTTPDummyServerTestCase, IPv6HTTPDummyServerTestCase from urllib3.poolmanager import PoolManager from urllib3.connectionpool import port_by_scheme from urllib3.exception... | "bar" | 202 | 12 |
urllib3/urllib3 | train | 325 | 15e64de5a67a87f5350538cff1f011cb03ffde03 | train | test/with_dummyserver/test_poolmanager.py | train | urllib3/urllib3:test/with_dummyserver/test_poolmanager.py | 295 | 12 | assert | test_missing_port | import json
import pytest
from dummyserver.server import HAS_IPV6
from dummyserver.testcase import HTTPDummyServerTestCase, IPv6HTTPDummyServerTestCase
from urllib3.poolmanager import PoolManager
from urllib3.connectionpool import port_by_scheme
from urllib3.exceptions import MaxRetryError
from urllib3.util.retry imp... | b"Dummy server!" | modified | 7f975981d6c41fbecdde0dcf7d8448f17774e5ff45efc22e50afe9a5bcc10410 | assert|test_missing_port|import json import pytest from dummyserver.server import HAS_IPV6 from dummyserver.testcase import HTTPDummyServerTestCase, IPv6HTTPDummyServerTestCase from urllib3.poolmanager import PoolManager from urllib3.connectionpool import port_by_scheme from urllib3.exceptions import MaxRetryError from... | b"Dummy server!" | 292 | 12 |
urllib3/urllib3 | train | 325 | 15e64de5a67a87f5350538cff1f011cb03ffde03 | train | test/with_dummyserver/test_proxy_poolmanager.py | train | urllib3/urllib3:test/with_dummyserver/test_proxy_poolmanager.py | 133 | 12 | assert | test_redirect | import json
import socket
import pytest
from dummyserver.testcase import HTTPDummyProxyTestCase, IPv6HTTPDummyProxyTestCase
from dummyserver.server import DEFAULT_CA, DEFAULT_CA_BAD, get_unreachable_address
from .. import TARPIT_HOST, requires_network
from urllib3._collections import HTTPHeaderDict
from urllib3.pool... | b"Dummy server!" | modified | 5e051dfaf48fc42e6d5026c9ef57c120a21fe5313fc5ab3f539c170b3faf774f | assert|test_redirect|import json import socket import pytest from dummyserver.testcase import HTTPDummyProxyTestCase, IPv6HTTPDummyProxyTestCase from dummyserver.server import DEFAULT_CA, DEFAULT_CA_BAD, get_unreachable_address from .. import TARPIT_HOST, requires_network from urllib3._collections import HTTPHeaderDict... | b"Dummy server!" | 130 | 12 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.