repo_id string | cross_repo_split string | commit_index int32 | commit_sha string | in_repo_split string | test_file string | file_split string | split_group string | lineno int32 | col_offset int32 | assertion_type string | test_function string | prefix large_string | target string | assertion_event_type string | assertion_event_id string | assertion_anchor large_string | old_target string | old_lineno int32 | old_col_offset int32 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
urllib3/urllib3 | train | 417 | 6dc3b68b944fa242bc7a91388c16ca9322c729fd | train | test/with_dummyserver/test_https.py | train | urllib3/urllib3:test/with_dummyserver/test_https.py | 444 | 16 | assert | test_server_hostname | import datetime
import json
import logging
import os.path
import shutil
import ssl
import sys
import tempfile
import warnings
from test import (
LONG_TIMEOUT,
SHORT_TIMEOUT,
TARPIT_HOST,
notOpenSSL098,
notSecureTransport,
onlyPy279OrNewer,
requires_network,
requires_ssl_context_keyfile_p... | "localhost" | added | 4578db48465fcba15340b2b8e7f8e34b23197356ade3a8bc54c768700e2d4c3f | assert|test_server_hostname|import datetime import json import logging import os.path import shutil import ssl import sys import tempfile import warnings from test import ( LONG_TIMEOUT, SHORT_TIMEOUT, TARPIT_HOST, notOpenSSL098, notSecureTransport, onlyPy279OrNewer, requires_network, requires_ssl_context_keyfile_passw... | null | null | null |
urllib3/urllib3 | train | 417 | 6dc3b68b944fa242bc7a91388c16ca9322c729fd | train | test/with_dummyserver/test_https.py | train | urllib3/urllib3:test/with_dummyserver/test_https.py | 547 | 17 | pytest.raises | test_https_timeout | import datetime
import json
import logging
import os.path
import shutil
import ssl
import sys
import tempfile
import warnings
from test import (
LONG_TIMEOUT,
SHORT_TIMEOUT,
TARPIT_HOST,
notOpenSSL098,
notSecureTransport,
onlyPy279OrNewer,
requires_network,
requires_ssl_context_keyfile_p... | ConnectTimeoutError) | added | 69b8f12d59b4a5cb96e4fc358393c7107be364566043ce291029840cd941cd45 | pytest.raises|test_https_timeout|import datetime import json import logging import os.path import shutil import ssl import sys import tempfile import warnings from test import ( LONG_TIMEOUT, SHORT_TIMEOUT, TARPIT_HOST, notOpenSSL098, notSecureTransport, onlyPy279OrNewer, requires_network, requires_ssl_context_keyfile_... | null | null | null |
urllib3/urllib3 | train | 417 | 6dc3b68b944fa242bc7a91388c16ca9322c729fd | train | test/with_dummyserver/test_https.py | train | urllib3/urllib3:test/with_dummyserver/test_https.py | 667 | 16 | assert | test_ssl_wrong_system_time | import datetime
import json
import logging
import os.path
import shutil
import ssl
import sys
import tempfile
import warnings
from test import (
LONG_TIMEOUT,
SHORT_TIMEOUT,
TARPIT_HOST,
notOpenSSL098,
notSecureTransport,
onlyPy279OrNewer,
requires_network,
requires_ssl_context_keyfile_p... | warning.category | modified | 91ba979cfd5292445c819dec8baa620b1a25b7c454a4ffc9119518986efb3952 | assert|test_ssl_wrong_system_time|import datetime import json import logging import os.path import shutil import ssl import sys import tempfile import warnings from test import ( LONG_TIMEOUT, SHORT_TIMEOUT, TARPIT_HOST, notOpenSSL098, notSecureTransport, onlyPy279OrNewer, requires_network, requires_ssl_context_keyfile... | 1 | 668 | 16 |
urllib3/urllib3 | train | 418 | 6fc17a344532171d2a54a2cabc686f89e3658dbd | train | test/test_ssltransport.py | train | urllib3/urllib3:test/test_ssltransport.py | 108 | 13 | pytest.raises | test_start_closed_socket | import platform
import select
import socket
import ssl
import sys
import mock
import pytest
from dummyserver.server import DEFAULT_CA, DEFAULT_CERTS
from dummyserver.testcase import SocketDummyServerTestCase, consume_socket
from urllib3.util import ssl_
from urllib3.util.ssltransport import SSLTransport
# consume_so... | OSError) | modified | 09ced43b9d9f5c9dd832f2c129948b8b6f8571476804b5193fd6330a3e7d7dd2 | pytest.raises|test_start_closed_socket|import platform import select import socket import ssl import sys import mock import pytest from dummyserver.server import DEFAULT_CA, DEFAULT_CERTS from dummyserver.testcase import SocketDummyServerTestCase, consume_socket from urllib3.util import ssl_ from urllib3.util.ssltransp... | OSError) | 106 | 13 |
urllib3/urllib3 | train | 418 | 6fc17a344532171d2a54a2cabc686f89e3658dbd | train | test/test_ssltransport.py | train | urllib3/urllib3:test/test_ssltransport.py | 146 | 17 | pytest.raises | test_unbuffered_text_makefile | import platform
import select
import socket
import ssl
import sys
import mock
import pytest
from dummyserver.server import DEFAULT_CA, DEFAULT_CERTS
from dummyserver.testcase import SocketDummyServerTestCase, consume_socket
from urllib3.util import ssl_
from urllib3.util.ssltransport import SSLTransport
# consume_so... | ValueError) | modified | 8f41e09b74a963eb3e2b7c4235291982fcfb67993e5803baa743baf996fca6df | pytest.raises|test_unbuffered_text_makefile|import platform import select import socket import ssl import sys import mock import pytest from dummyserver.server import DEFAULT_CA, DEFAULT_CERTS from dummyserver.testcase import SocketDummyServerTestCase, consume_socket from urllib3.util import ssl_ from urllib3.util.sslt... | ValueError) | 144 | 17 |
urllib3/urllib3 | train | 418 | 6fc17a344532171d2a54a2cabc686f89e3658dbd | train | test/test_ssltransport.py | train | urllib3/urllib3:test/test_ssltransport.py | 205 | 12 | assert | test_ssl_object_attributes | import platform
import select
import socket
import ssl
import sys
import mock
import pytest
from dummyserver.server import DEFAULT_CA, DEFAULT_CERTS
from dummyserver.testcase import SocketDummyServerTestCase, consume_socket
from urllib3.util import ssl_
from urllib3.util.ssltransport import SSLTransport
# consume_so... | list | modified | 96772088feac53bd8ff10124f702feef261b8fb6f15c22fd0f7037b63fdbfea9 | assert|test_ssl_object_attributes|import platform import select import socket import ssl import sys import mock import pytest from dummyserver.server import DEFAULT_CA, DEFAULT_CERTS from dummyserver.testcase import SocketDummyServerTestCase, consume_socket from urllib3.util import ssl_ from urllib3.util.ssltransport i... | list | 203 | 12 |
urllib3/urllib3 | train | 418 | 6fc17a344532171d2a54a2cabc686f89e3658dbd | train | test/test_ssltransport.py | train | urllib3/urllib3:test/test_ssltransport.py | 358 | 16 | assert | test_tls_in_tls_tunnel | import platform
import select
import socket
import ssl
import sys
import mock
import pytest
from dummyserver.server import DEFAULT_CA, DEFAULT_CERTS
from dummyserver.testcase import SocketDummyServerTestCase, consume_socket
from urllib3.util import ssl_
from urllib3.util.ssltransport import SSLTransport
# consume_so... | None | modified | 4abc898069bd66c84ef66e6f03dc0b673ed878ebce80998aaaa27baec9fb56cd | assert|test_tls_in_tls_tunnel|import platform import select import socket import ssl import sys import mock import pytest from dummyserver.server import DEFAULT_CA, DEFAULT_CERTS from dummyserver.testcase import SocketDummyServerTestCase, consume_socket from urllib3.util import ssl_ from urllib3.util.ssltransport impor... | None | 356 | 16 |
urllib3/urllib3 | train | 419 | 74d6be1ab66cef44c0f479c24b0fc1756a8fe4e9 | train | test/with_dummyserver/test_connectionpool.py | train | urllib3/urllib3:test/with_dummyserver/test_connectionpool.py | 1,003 | 12 | assert | test_user_agent_non_ascii_user_agent | # -*- coding: utf-8 -*-
import io
import json
import logging
import socket
import sys
import time
import warnings
from test import LONG_TIMEOUT, SHORT_TIMEOUT, onlyPy2
from threading import Event
import mock
import pytest
import six
from dummyserver.server import HAS_IPV6_AND_DNS, NoIPv6Warning
from dummyserver.test... | request_headers | added | 89f29d5cc3724b2aaa0b4ea7b2d371b3c531a7d9739d9606333f7db379fbf982 | assert|test_user_agent_non_ascii_user_agent|# -*- coding: utf-8 -*- import io import json import logging import socket import sys import time import warnings from test import LONG_TIMEOUT, SHORT_TIMEOUT, onlyPy2 from threading import Event import mock import pytest import six from dummyserver.server import HAS_IPV6_AND... | null | null | null |
urllib3/urllib3 | train | 419 | 74d6be1ab66cef44c0f479c24b0fc1756a8fe4e9 | train | test/with_dummyserver/test_connectionpool.py | train | urllib3/urllib3:test/with_dummyserver/test_connectionpool.py | 1,009 | 17 | pytest.raises | test_user_agent_non_ascii_fails_on_python_2 | # -*- coding: utf-8 -*-
import io
import json
import logging
import socket
import sys
import time
import warnings
from test import LONG_TIMEOUT, SHORT_TIMEOUT, onlyPy2
from threading import Event
import mock
import pytest
import six
from dummyserver.server import HAS_IPV6_AND_DNS, NoIPv6Warning
from dummyserver.test... | UnicodeEncodeError) | added | 6b8b092e520e8e4ee7e8f25b0fd214ab8823aba3fa75345bad26b7a424014024 | pytest.raises|test_user_agent_non_ascii_fails_on_python_2|# -*- coding: utf-8 -*- import io import json import logging import socket import sys import time import warnings from test import LONG_TIMEOUT, SHORT_TIMEOUT, onlyPy2 from threading import Event import mock import pytest import six from dummyserver.server impor... | null | null | null |
urllib3/urllib3 | train | 419 | 74d6be1ab66cef44c0f479c24b0fc1756a8fe4e9 | train | test/with_dummyserver/test_connectionpool.py | train | urllib3/urllib3:test/with_dummyserver/test_connectionpool.py | 1,024 | 17 | pytest.raises | test_max_retry | # -*- coding: utf-8 -*-
import io
import json
import logging
import socket
import sys
import time
import warnings
from test import LONG_TIMEOUT, SHORT_TIMEOUT, onlyPy2
from threading import Event
import mock
import pytest
import six
from dummyserver.server import HAS_IPV6_AND_DNS, NoIPv6Warning
from dummyserver.test... | MaxRetryError) | added | 3322594ac00dba37b1f689df02e971534316e2cea8f1acf986fcb0fd3dc8ad63 | pytest.raises|test_max_retry|# -*- coding: utf-8 -*- import io import json import logging import socket import sys import time import warnings from test import LONG_TIMEOUT, SHORT_TIMEOUT, onlyPy2 from threading import Event import mock import pytest import six from dummyserver.server import HAS_IPV6_AND_DNS, NoIPv6War... | null | null | null |
urllib3/urllib3 | train | 419 | 74d6be1ab66cef44c0f479c24b0fc1756a8fe4e9 | train | test/with_dummyserver/test_connectionpool.py | train | urllib3/urllib3:test/with_dummyserver/test_connectionpool.py | 1,142 | 12 | assert | test_retry_redirect_history | # -*- coding: utf-8 -*-
import io
import json
import logging
import socket
import sys
import time
import warnings
from test import LONG_TIMEOUT, SHORT_TIMEOUT, onlyPy2
from threading import Event
import mock
import pytest
import six
from dummyserver.server import HAS_IPV6_AND_DNS, NoIPv6Warning
from dummyserver.test... | ( RequestHistory("GET", "/redirect?target=%2F", None, 303, "/"), ) | added | 5c6b5aa8b8728fed3ff6b445e5852ee25a7b402205b4b149732f5d012cdda1aa | assert|test_retry_redirect_history|# -*- coding: utf-8 -*- import io import json import logging import socket import sys import time import warnings from test import LONG_TIMEOUT, SHORT_TIMEOUT, onlyPy2 from threading import Event import mock import pytest import six from dummyserver.server import HAS_IPV6_AND_DNS, NoI... | null | null | null |
urllib3/urllib3 | train | 420 | 087d4de8487379033970898866625c00e0d51c85 | train | test/contrib/test_socks.py | train | urllib3/urllib3:test/contrib/test_socks.py | 127 | 8 | assert | from __future__ import absolute_import
import socket
import threading
from socket import getaddrinfo as real_getaddrinfo
from test import SHORT_TIMEOUT
import pytest
import socks as py_socks
from dummyserver.server import DEFAULT_CA, DEFAULT_CERTS
from dummyserver.testcase import IPV4SocketDummyServerTestCase
from u... | methods | added | 2436b91a0d0a2fb728f9c65ac71cc780a2ba035afa0367d07fa2af56e1ebec36 | assert||from __future__ import absolute_import import socket import threading from socket import getaddrinfo as real_getaddrinfo from test import SHORT_TIMEOUT import pytest import socks as py_socks from dummyserver.server import DEFAULT_CA, DEFAULT_CERTS from dummyserver.testcase import IPV4SocketDummyServerTestCase f... | null | null | null | |
urllib3/urllib3 | train | 420 | 087d4de8487379033970898866625c00e0d51c85 | train | test/contrib/test_socks.py | train | urllib3/urllib3:test/contrib/test_socks.py | 315 | 12 | assert | test_correct_header_line | from __future__ import absolute_import
import socket
import threading
from socket import getaddrinfo as real_getaddrinfo
from test import SHORT_TIMEOUT
import pytest
import socks as py_socks
from dummyserver.server import DEFAULT_CA, DEFAULT_CERTS
from dummyserver.testcase import IPV4SocketDummyServerTestCase
from u... | buf.startswith(b"GET / HTTP/1.1") | added | 307d13ef27cc971f4bba0c8efa82c8037a49c4262886c2e073621cd032692932 | assert|test_correct_header_line|from __future__ import absolute_import import socket import threading from socket import getaddrinfo as real_getaddrinfo from test import SHORT_TIMEOUT import pytest import socks as py_socks from dummyserver.server import DEFAULT_CA, DEFAULT_CERTS from dummyserver.testcase import IPV4Soc... | null | null | null |
urllib3/urllib3 | train | 420 | 087d4de8487379033970898866625c00e0d51c85 | train | test/contrib/test_socks.py | train | urllib3/urllib3:test/contrib/test_socks.py | 358 | 17 | pytest.raises | test_connection_failure | from __future__ import absolute_import
import socket
import threading
from socket import getaddrinfo as real_getaddrinfo
from test import SHORT_TIMEOUT
import pytest
import socks as py_socks
from dummyserver.server import DEFAULT_CA, DEFAULT_CERTS
from dummyserver.testcase import IPV4SocketDummyServerTestCase
from u... | NewConnectionError) | added | b4cac2d2e07cbec33f7d2687877ef59ef8b1dbc6536f4b77d15fa3b58595b3a2 | pytest.raises|test_connection_failure|from __future__ import absolute_import import socket import threading from socket import getaddrinfo as real_getaddrinfo from test import SHORT_TIMEOUT import pytest import socks as py_socks from dummyserver.server import DEFAULT_CA, DEFAULT_CERTS from dummyserver.testcase import I... | null | null | null |
urllib3/urllib3 | train | 420 | 087d4de8487379033970898866625c00e0d51c85 | train | test/contrib/test_socks.py | train | urllib3/urllib3:test/contrib/test_socks.py | 475 | 12 | assert | test_socks_with_invalid_password | from __future__ import absolute_import
import socket
import threading
from socket import getaddrinfo as real_getaddrinfo
from test import SHORT_TIMEOUT
import pytest
import socks as py_socks
from dummyserver.server import DEFAULT_CA, DEFAULT_CERTS
from dummyserver.testcase import IPV4SocketDummyServerTestCase
from u... | str(e.value) | added | 0022dec115a1e85ddb6ba5fb6cff6eaa80ab969399977c03f791206e703f5294 | assert|test_socks_with_invalid_password|from __future__ import absolute_import import socket import threading from socket import getaddrinfo as real_getaddrinfo from test import SHORT_TIMEOUT import pytest import socks as py_socks from dummyserver.server import DEFAULT_CA, DEFAULT_CERTS from dummyserver.testcase import... | null | null | null |
urllib3/urllib3 | train | 421 | fbe9620784b130dcdccf43cd3105940152c4d762 | train | dummyserver/testcase.py | train | urllib3/urllib3:dummyserver/testcase.py | 91 | 16 | assert | import threading
from contextlib import contextmanager
import pytest
from tornado import ioloop, web
from dummyserver.handlers import TestingApp
from dummyserver.proxy import ProxyHandler
from dummyserver.server import (
DEFAULT_CERTS,
HAS_IPV6,
SocketServerThread,
run_loop_in_thread,
run_tornado_... | expected_value | modified | 509aa65f543c8085e21dc641100c08c9dbc039b60da7c4445ca87642a77f3125 | assert||import threading from contextlib import contextmanager import pytest from tornado import ioloop, web from dummyserver.handlers import TestingApp from dummyserver.proxy import ProxyHandler from dummyserver.server import ( DEFAULT_CERTS, HAS_IPV6, SocketServerThread, run_loop_in_thread, run_tornado_app, ) from ur... | expected_value | 91 | 16 | |
urllib3/urllib3 | train | 421 | fbe9620784b130dcdccf43cd3105940152c4d762 | train | test/contrib/test_pyopenssl_dependencies.py | train | urllib3/urllib3:test/contrib/test_pyopenssl_dependencies.py | 57 | 21 | pytest.raises | test_inject_validate_fail_pyopenssl | from unittest.mock import Mock, patch
import pytest
try:
from urllib3.contrib.pyopenssl import extract_from_urllib3, inject_into_urllib3
except ImportError:
pass
def setup_module():
try:
from urllib3.contrib.pyopenssl import inject_into_urllib3
inject_into_urllib3()
except ImportErr... | ImportError) | modified | 6b4e47254017a0f74503f1e1aae889538407b15e2c7a2d756695df45ae1ac37e | pytest.raises|test_inject_validate_fail_pyopenssl|from unittest.mock import Mock, patch import pytest try: from urllib3.contrib.pyopenssl import extract_from_urllib3, inject_into_urllib3 except ImportError: pass def setup_module(): try: from urllib3.contrib.pyopenssl import inject_into_urllib3 inject_into_urllib3() exc... | ImportError) | 57 | 21 |
urllib3/urllib3 | train | 421 | fbe9620784b130dcdccf43cd3105940152c4d762 | train | test/contrib/test_securetransport.py | train | urllib3/urllib3:test/contrib/test_securetransport.py | 52 | 13 | pytest.raises | test_no_crash_with_empty_trust_bundle | 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()
except ImportError as e:
... | ssl.SSLError) | modified | 6c2364c34e0298108d263fce7f16fd5361d2e2eb636ff60862a9012c4f16ae9f | pytest.raises|test_no_crash_with_empty_trust_bundle|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() except Impor... | ssl.SSLError) | 53 | 13 |
urllib3/urllib3 | train | 421 | fbe9620784b130dcdccf43cd3105940152c4d762 | train | test/contrib/test_socks.py | train | urllib3/urllib3:test/contrib/test_socks.py | 378 | 17 | pytest.raises | test_proxy_rejection | from __future__ import absolute_import
import socket
import threading
from socket import getaddrinfo as real_getaddrinfo
from test import SHORT_TIMEOUT
import pytest
import socks as py_socks
from dummyserver.server import DEFAULT_CA, DEFAULT_CERTS
from dummyserver.testcase import IPV4SocketDummyServerTestCase
from u... | NewConnectionError) | modified | f97472e158841999d03db76697f86323925dfe4e6f58411afdf2bef4741f4391 | pytest.raises|test_proxy_rejection|from __future__ import absolute_import import socket import threading from socket import getaddrinfo as real_getaddrinfo from test import SHORT_TIMEOUT import pytest import socks as py_socks from dummyserver.server import DEFAULT_CA, DEFAULT_CERTS from dummyserver.testcase import IPV4... | NewConnectionError) | 378 | 17 |
urllib3/urllib3 | train | 421 | fbe9620784b130dcdccf43cd3105940152c4d762 | train | test/test_fields.py | train | urllib3/urllib3:test/test_fields.py | 101 | 8 | assert | test_from_tuples_html5 | import pytest
from urllib3.fields import RequestField, format_header_param_rfc2231, guess_content_type
class TestRequestField:
@pytest.mark.parametrize(
"filename, content_types",
[
("image.jpg", ["image/jpeg", "image/pjpeg"]),
("notsure", ["application/octet-stream"]),
... | 'form-data; name="fieldname"; filename="filen\u00e4me"' | modified | a2dc66db196e65d44b42ff47f296c0a5a3d82e31cd3786b1739fcda9c61fae25 | assert|test_from_tuples_html5|import pytest from urllib3.fields import RequestField, format_header_param_rfc2231, guess_content_type class TestRequestField: @pytest.mark.parametrize( "filename, content_types", [ ("image.jpg", ["image/jpeg", "image/pjpeg"]), ("notsure", ["application/octet-stream"]), (None, ["applicatio... | u('form-data; name="fieldname"; filename="filen\u00e4me"') | 102 | 8 |
urllib3/urllib3 | train | 421 | fbe9620784b130dcdccf43cd3105940152c4d762 | train | test/test_no_ssl.py | train | urllib3/urllib3:test/test_no_ssl.py | 83 | 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:
"""
Block Imports
To be placed on ``sys.meta_path``. This ensures th... | ImportError) | modified | f1cf6f51db952c1d2fd0eef29f9998d2ea3fa838dfa562b9475d43500e5ff8ee | 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: """ Block Imports To be placed on ``sys.meta_path... | ImportError) | 83 | 13 |
urllib3/urllib3 | train | 421 | fbe9620784b130dcdccf43cd3105940152c4d762 | train | test/test_ssl.py | train | urllib3/urllib3:test/test_ssl.py | 113 | 4 | assert | test_create_urllib3_context_set_ciphers | from unittest import mock
import pytest
from urllib3.exceptions import SNIMissingWarning
from urllib3.util import ssl_
@pytest.mark.parametrize(
"addr",
[
# IPv6
"::1",
"::",
"FE80::8939:7684:D84b:a5A4%251",
# IPv4
"127.0.0.1",
"8.8.8.8",
b"127... | context | modified | 356828447e85504fe886b3b232a36c259e8ba5e9aa0fd53a68b3164ac108239f | assert|test_create_urllib3_context_set_ciphers|from unittest import mock import pytest from urllib3.exceptions import SNIMissingWarning from urllib3.util import ssl_ @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 "... | context | 114 | 4 |
urllib3/urllib3 | train | 421 | fbe9620784b130dcdccf43cd3105940152c4d762 | train | test/test_util.py | train | urllib3/urllib3:test/test_util.py | 600 | 8 | assert | test_timeout | import hashlib
import io
import logging
import socket
import ssl
import warnings
from itertools import chain
from test import notBrotlipy, onlyBrotlipy
from unittest.mock import Mock, patch
import pytest
from urllib3 import add_stderr_logger, disable_warnings, util
from urllib3.exceptions import (
InsecureRequest... | Timeout.DEFAULT_TIMEOUT | added | d6ed545a6c319fa33b0eb3bbb4ba2c7a7bcba30c023f1d7a9ce9cc2e295b2ae1 | assert|test_timeout|import hashlib import io import logging import socket import ssl import warnings from itertools import chain from test import notBrotlipy, onlyBrotlipy from unittest.mock import Mock, patch import pytest from urllib3 import add_stderr_logger, disable_warnings, util from urllib3.exceptions import ( I... | null | null | null |
urllib3/urllib3 | train | 422 | 6af53ac41757399607382bf10a92b288fdf4951d | train | test/test_util.py | train | urllib3/urllib3:test/test_util.py | 713 | 12 | assert | test_ip_family_ipv6_enabled | import hashlib
import io
import logging
import socket
import ssl
import warnings
from itertools import chain
from test import notBrotlipy, onlyBrotlipy
from unittest.mock import Mock, patch
import pytest
from urllib3 import add_stderr_logger, disable_warnings, util
from urllib3.exceptions import (
InsecureRequest... | socket.AF_UNSPEC | added | 0195d6934d1666aff3686328b65d05b3bc6cc8197fd1e27765c9091c496e4b33 | assert|test_ip_family_ipv6_enabled|import hashlib import io import logging import socket import ssl import warnings from itertools import chain from test import notBrotlipy, onlyBrotlipy from unittest.mock import Mock, patch import pytest from urllib3 import add_stderr_logger, disable_warnings, util from urllib3.except... | null | null | null |
urllib3/urllib3 | train | 422 | 6af53ac41757399607382bf10a92b288fdf4951d | train | test/test_util.py | train | urllib3/urllib3:test/test_util.py | 717 | 12 | assert | test_ip_family_ipv6_disabled | import hashlib
import io
import logging
import socket
import ssl
import warnings
from itertools import chain
from test import notBrotlipy, onlyBrotlipy
from unittest.mock import Mock, patch
import pytest
from urllib3 import add_stderr_logger, disable_warnings, util
from urllib3.exceptions import (
InsecureRequest... | socket.AF_INET | added | 4a657974933471e788aabebaa9085db9bac7b188e6bdffc96825b62038a41ec6 | assert|test_ip_family_ipv6_disabled|import hashlib import io import logging import socket import ssl import warnings from itertools import chain from test import notBrotlipy, onlyBrotlipy from unittest.mock import Mock, patch import pytest from urllib3 import add_stderr_logger, disable_warnings, util from urllib3.excep... | null | null | null |
urllib3/urllib3 | train | 422 | 6af53ac41757399607382bf10a92b288fdf4951d | train | test/test_util.py | train | urllib3/urllib3:test/test_util.py | 763 | 8 | assert_* | test_assert_header_parsing_no_error_on_multipart | import hashlib
import io
import logging
import socket
import ssl
import warnings
from itertools import chain
from test import notBrotlipy, onlyBrotlipy
from unittest.mock import Mock, patch
import pytest
from urllib3 import add_stderr_logger, disable_warnings, util
from urllib3.exceptions import (
InsecureRequest... | client.parse_headers(header_msg)) | added | 44abc068f800508a6dfeb5f4bc910623d1ef2cace60d144861d5835ea7a07630 | assert_*|test_assert_header_parsing_no_error_on_multipart|import hashlib import io import logging import socket import ssl import warnings from itertools import chain from test import notBrotlipy, onlyBrotlipy from unittest.mock import Mock, patch import pytest from urllib3 import add_stderr_logger, disable_warnings, u... | null | null | null |
urllib3/urllib3 | train | 422 | 6af53ac41757399607382bf10a92b288fdf4951d | train | test/test_util.py | train | urllib3/urllib3:test/test_util.py | 769 | 8 | assert | test_create_connection_with_invalid_idna_labels | import hashlib
import io
import logging
import socket
import ssl
import warnings
from itertools import chain
from test import notBrotlipy, onlyBrotlipy
from unittest.mock import Mock, patch
import pytest
from urllib3 import add_stderr_logger, disable_warnings, util
from urllib3.exceptions import (
InsecureRequest... | f"Failed to parse: '{host}', label empty or too long" | added | 223ec068863a030d567c0f03d7a4b6e1de40c71ede6bed630aba8f75153ffff8 | assert|test_create_connection_with_invalid_idna_labels|import hashlib import io import logging import socket import ssl import warnings from itertools import chain from test import notBrotlipy, onlyBrotlipy from unittest.mock import Mock, patch import pytest from urllib3 import add_stderr_logger, disable_warnings, util... | null | null | null |
urllib3/urllib3 | train | 423 | b6061f09741082bed3d8b7db10c25bf1ae683a43 | train | test/test_compatibility.py | train | urllib3/urllib3:test/test_compatibility.py | 20 | 8 | assert | test_extract | import http.cookiejar
import urllib
from urllib3.response import HTTPResponse
class TestCookiejar:
def test_extract(self):
request = urllib.request.Request("http://google.com")
cookiejar = http.cookiejar.CookieJar()
response = HTTPResponse()
cookies = [
"sessionhash=a... | len(cookies) | added | 39e165cc09903163ca2d57668526d63e7743cd4fd4caaaf239fb57f38d51ed64 | assert|test_extract|import http.cookiejar import urllib from urllib3.response import HTTPResponse class TestCookiejar: def test_extract(self): request = urllib.request.Request("http://google.com") cookiejar = http.cookiejar.CookieJar() response = HTTPResponse() cookies = [ "sessionhash=abcabcabcabcab; path=/; HttpOnly"... | null | null | null |
urllib3/urllib3 | train | 423 | b6061f09741082bed3d8b7db10c25bf1ae683a43 | train | test/test_poolmanager.py | train | urllib3/urllib3:test/test_poolmanager.py | 129 | 8 | assert | test_http_pool_key_fields | import socket
from test import resolvesLocalhostFQDN
import pytest
from urllib3 import connection_from_url
from urllib3.exceptions import ClosedPoolError, LocationValueError
from urllib3.poolmanager import PoolKey, PoolManager, key_fn_by_scheme
from urllib3.util import retry, timeout
class TestPoolManager:
@res... | all(isinstance(key, PoolKey) for key in p.pools.keys()) | modified | 1d3a23cd192e5ae799c2f519e93d820e9997250bd71d71f72642053a6ae357f3 | assert|test_http_pool_key_fields|import socket from test import resolvesLocalhostFQDN import pytest from urllib3 import connection_from_url from urllib3.exceptions import ClosedPoolError, LocationValueError from urllib3.poolmanager import PoolKey, PoolManager, key_fn_by_scheme from urllib3.util import retry, timeout cl... | all(isinstance(key, PoolKey) for key in p.pools.keys()) | 130 | 8 |
urllib3/urllib3 | train | 423 | b6061f09741082bed3d8b7db10c25bf1ae683a43 | train | test/test_poolmanager.py | train | urllib3/urllib3:test/test_poolmanager.py | 204 | 8 | assert | test_https_connection_from_url_case_insensitive | import socket
from test import resolvesLocalhostFQDN
import pytest
from urllib3 import connection_from_url
from urllib3.exceptions import ClosedPoolError, LocationValueError
from urllib3.poolmanager import PoolKey, PoolManager, key_fn_by_scheme
from urllib3.util import retry, timeout
class TestPoolManager:
@res... | other_pool | modified | 66705fdf3764ba1c55ed6f81c63ae143d6489fa01979ddb0a9334d19eba191c0 | assert|test_https_connection_from_url_case_insensitive|import socket from test import resolvesLocalhostFQDN import pytest from urllib3 import connection_from_url from urllib3.exceptions import ClosedPoolError, LocationValueError from urllib3.poolmanager import PoolKey, PoolManager, key_fn_by_scheme from urllib3.util im... | other_pool | 206 | 8 |
urllib3/urllib3 | train | 423 | b6061f09741082bed3d8b7db10c25bf1ae683a43 | train | test/test_poolmanager.py | train | urllib3/urllib3:test/test_poolmanager.py | 245 | 8 | assert | test_http_connection_from_host_case_insensitive | import socket
from test import resolvesLocalhostFQDN
import pytest
from urllib3 import connection_from_url
from urllib3.exceptions import ClosedPoolError, LocationValueError
from urllib3.poolmanager import PoolKey, PoolManager, key_fn_by_scheme
from urllib3.util import retry, timeout
class TestPoolManager:
@res... | len(p.pools) | modified | 68a040a72e0f0d9ea0c8eb3d23f531dd69bb0868b50cc4c95e14dde0c4427fa1 | assert|test_http_connection_from_host_case_insensitive|import socket from test import resolvesLocalhostFQDN import pytest from urllib3 import connection_from_url from urllib3.exceptions import ClosedPoolError, LocationValueError from urllib3.poolmanager import PoolKey, PoolManager, key_fn_by_scheme from urllib3.util im... | len(p.pools) | 247 | 8 |
urllib3/urllib3 | train | 423 | b6061f09741082bed3d8b7db10c25bf1ae683a43 | train | test/test_poolmanager.py | train | urllib3/urllib3:test/test_poolmanager.py | 256 | 8 | assert | test_assert_hostname_and_fingerprint_flag | import socket
from test import resolvesLocalhostFQDN
import pytest
from urllib3 import connection_from_url
from urllib3.exceptions import ClosedPoolError, LocationValueError
from urllib3.poolmanager import PoolKey, PoolManager, key_fn_by_scheme
from urllib3.util import retry, timeout
class TestPoolManager:
@res... | pool.assert_fingerprint | modified | 08fe3575aec365cb60481aca638f8e8a0f7d67b95bf10f782f05810b77493a97 | assert|test_assert_hostname_and_fingerprint_flag|import socket from test import resolvesLocalhostFQDN import pytest from urllib3 import connection_from_url from urllib3.exceptions import ClosedPoolError, LocationValueError from urllib3.poolmanager import PoolKey, PoolManager, key_fn_by_scheme from urllib3.util import r... | pool.assert_fingerprint | 258 | 8 |
urllib3/urllib3 | train | 424 | 897d5aab0d87ea1ab86b240603ee95103eb74fa5 | train | test/test_util.py | train | urllib3/urllib3:test/test_util.py | 329 | 13 | pytest.raises | test_parse_url_negative_port | import hashlib
import io
import logging
import socket
import ssl
import warnings
from itertools import chain
from test import notBrotlipy, onlyBrotlipy
from unittest.mock import Mock, patch
import pytest
from urllib3 import add_stderr_logger, disable_warnings, util
from urllib3.exceptions import (
InsecureRequest... | LocationParseError) | added | 06577e921bcb807b3517b362ed731242c99cc022f53e6b7c1a2a7ce6c00680e0 | pytest.raises|test_parse_url_negative_port|import hashlib import io import logging import socket import ssl import warnings from itertools import chain from test import notBrotlipy, onlyBrotlipy from unittest.mock import Mock, patch import pytest from urllib3 import add_stderr_logger, disable_warnings, util from urllib... | null | null | null |
urllib3/urllib3 | train | 424 | 897d5aab0d87ea1ab86b240603ee95103eb74fa5 | train | test/test_util.py | train | urllib3/urllib3:test/test_util.py | 334 | 8 | assert | test_Url_str | import hashlib
import io
import logging
import socket
import ssl
import warnings
from itertools import chain
from test import notBrotlipy, onlyBrotlipy
from unittest.mock import Mock, patch
import pytest
from urllib3 import add_stderr_logger, disable_warnings, util
from urllib3.exceptions import (
InsecureRequest... | U.url | added | d41d303a8f435487e4103b41caf2d4d0670dfb146087ba8a0d2b2779ac81cd0b | assert|test_Url_str|import hashlib import io import logging import socket import ssl import warnings from itertools import chain from test import notBrotlipy, onlyBrotlipy from unittest.mock import Mock, patch import pytest from urllib3 import add_stderr_logger, disable_warnings, util from urllib3.exceptions import ( I... | null | null | null |
urllib3/urllib3 | train | 424 | 897d5aab0d87ea1ab86b240603ee95103eb74fa5 | train | test/test_util.py | train | urllib3/urllib3:test/test_util.py | 509 | 13 | pytest.raises | test_rewind_body_bad_position | import hashlib
import io
import logging
import socket
import ssl
import warnings
from itertools import chain
from test import notBrotlipy, onlyBrotlipy
from unittest.mock import Mock, patch
import pytest
from urllib3 import add_stderr_logger, disable_warnings, util
from urllib3.exceptions import (
InsecureRequest... | ValueError) | added | 0e49e6aed4a3eabf36f113f1075aaf572ddbb20a344d134249cdb3e82d0b1020 | pytest.raises|test_rewind_body_bad_position|import hashlib import io import logging import socket import ssl import warnings from itertools import chain from test import notBrotlipy, onlyBrotlipy from unittest.mock import Mock, patch import pytest from urllib3 import add_stderr_logger, disable_warnings, util from urlli... | null | null | null |
urllib3/urllib3 | train | 424 | 897d5aab0d87ea1ab86b240603ee95103eb74fa5 | train | test/test_util.py | train | urllib3/urllib3:test/test_util.py | 662 | 8 | assert | test_is_fp_closed_object_has_fp | import hashlib
import io
import logging
import socket
import ssl
import warnings
from itertools import chain
from test import notBrotlipy, onlyBrotlipy
from unittest.mock import Mock, patch
import pytest
from urllib3 import add_stderr_logger, disable_warnings, util
from urllib3.exceptions import (
InsecureRequest... | not is_fp_closed(FpFile()) | added | e29bbf0f959d5bc17019e312021eebf4624cd9439832aa7557241852cb1d3490 | assert|test_is_fp_closed_object_has_fp|import hashlib import io import logging import socket import ssl import warnings from itertools import chain from test import notBrotlipy, onlyBrotlipy from unittest.mock import Mock, patch import pytest from urllib3 import add_stderr_logger, disable_warnings, util from urllib3.ex... | null | null | null |
urllib3/urllib3 | train | 424 | 897d5aab0d87ea1ab86b240603ee95103eb74fa5 | train | test/with_dummyserver/test_socketlevel.py | train | urllib3/urllib3:test/with_dummyserver/test_socketlevel.py | 1,447 | 17 | pytest.raises | test_ssl_custom_validation_failure_terminates | # TODO: Break this module up into pieces. Maybe group by functionality tested
# rather than the socket level-ness of it.
import http.client as httplib
from dummyserver.server import (
DEFAULT_CA,
DEFAULT_CERTS,
encrypt_key_pem,
get_unreachable_address,
)
from dummyserver.testcase import SocketDummyServ... | SSLError) | modified | 7517be8d24918d130859b46750e6dfd3d6af28ed9ce604aa5a9abdf66291f4a6 | pytest.raises|test_ssl_custom_validation_failure_terminates|# TODO: Break this module up into pieces. Maybe group by functionality tested # rather than the socket level-ness of it. import http.client as httplib from dummyserver.server import ( DEFAULT_CA, DEFAULT_CERTS, encrypt_key_pem, get_unreachable_address, ) from ... | SSLError) | 1,448 | 17 |
urllib3/urllib3 | train | 424 | 897d5aab0d87ea1ab86b240603ee95103eb74fa5 | train | test/with_dummyserver/test_socketlevel.py | train | urllib3/urllib3:test/with_dummyserver/test_socketlevel.py | 1,458 | 17 | pytest.raises | test_bad_statusline | # TODO: Break this module up into pieces. Maybe group by functionality tested
# rather than the socket level-ness of it.
import http.client as httplib
from dummyserver.server import (
DEFAULT_CA,
DEFAULT_CERTS,
encrypt_key_pem,
get_unreachable_address,
)
from dummyserver.testcase import SocketDummyServ... | ProtocolError) | modified | 02687b40e1ef69fe7f3fcff6c9ce2ef0a39fb3a5b2448abb9a3445d7a226fd50 | pytest.raises|test_bad_statusline|# TODO: Break this module up into pieces. Maybe group by functionality tested # rather than the socket level-ness of it. import http.client as httplib from dummyserver.server import ( DEFAULT_CA, DEFAULT_CERTS, encrypt_key_pem, get_unreachable_address, ) from dummyserver.testcase impor... | ProtocolError) | 1,459 | 17 |
urllib3/urllib3 | train | 424 | 897d5aab0d87ea1ab86b240603ee95103eb74fa5 | train | test/with_dummyserver/test_socketlevel.py | train | urllib3/urllib3:test/with_dummyserver/test_socketlevel.py | 1,763 | 16 | assert | test_enforce_content_length_get | # TODO: Break this module up into pieces. Maybe group by functionality tested
# rather than the socket level-ness of it.
import http.client as httplib
from dummyserver.server import (
DEFAULT_CA,
DEFAULT_CERTS,
encrypt_key_pem,
get_unreachable_address,
)
from dummyserver.testcase import SocketDummyServ... | False | modified | 6c398129f1a0ec7a727dee8c62b509421f7eab98cac7c3639069c139171c0c5f | assert|test_enforce_content_length_get|# TODO: Break this module up into pieces. Maybe group by functionality tested # rather than the socket level-ness of it. import http.client as httplib from dummyserver.server import ( DEFAULT_CA, DEFAULT_CERTS, encrypt_key_pem, get_unreachable_address, ) from dummyserver.testcase ... | False | 1,764 | 16 |
urllib3/urllib3 | train | 424 | 897d5aab0d87ea1ab86b240603ee95103eb74fa5 | train | test/with_dummyserver/test_socketlevel.py | train | urllib3/urllib3:test/with_dummyserver/test_socketlevel.py | 1,899 | 16 | assert | test_multipart_assert_header_parsing_no_defects | # TODO: Break this module up into pieces. Maybe group by functionality tested
# rather than the socket level-ness of it.
import http.client as httplib
from dummyserver.server import (
DEFAULT_CA,
DEFAULT_CERTS,
encrypt_key_pem,
get_unreachable_address,
)
from dummyserver.testcase import SocketDummyServ... | "multipart/mixed; boundary=36eeb8c4e26d842a" | modified | f293a79e4f42c4df053e2a6b69f3ce36e9d3674bc4a7f85eac0dca2caa2458fa | assert|test_multipart_assert_header_parsing_no_defects|# TODO: Break this module up into pieces. Maybe group by functionality tested # rather than the socket level-ness of it. import http.client as httplib from dummyserver.server import ( DEFAULT_CA, DEFAULT_CERTS, encrypt_key_pem, get_unreachable_address, ) from dummy... | "multipart/mixed; boundary=36eeb8c4e26d842a" | 1,900 | 16 |
urllib3/urllib3 | train | 425 | 5a1562cc5e7048ba9d7efd3be9b89f42bb6986bc | train | test/test_filepost.py | val | urllib3/urllib3:test/test_filepost.py | 73 | 8 | assert | test_filename | import pytest
from urllib3.fields import RequestField
from urllib3.filepost import encode_multipart_formdata, iter_fields
BOUNDARY = "!! test boundary !!"
BOUNDARY_BYTES = BOUNDARY.encode()
class TestIterfields:
def test_dict(self):
for fieldname, value in iter_fields(dict(a="b")):
assert (f... | "multipart/form-data; boundary=" + str(BOUNDARY) | added | 153ee482d3600e9dc324b330ba3a69aef2f55e8277bb96313f122f10e6cebb7e | assert|test_filename|import pytest from urllib3.fields import RequestField from urllib3.filepost import encode_multipart_formdata, iter_fields BOUNDARY = "!! test boundary !!" BOUNDARY_BYTES = BOUNDARY.encode() class TestIterfields: def test_dict(self): for fieldname, value in iter_fields(dict(a="b")): assert (fieldnam... | null | null | null |
urllib3/urllib3 | train | 425 | 5a1562cc5e7048ba9d7efd3be9b89f42bb6986bc | train | test/test_filepost.py | val | urllib3/urllib3:test/test_filepost.py | 105 | 8 | assert | test_explicit | import pytest
from urllib3.fields import RequestField
from urllib3.filepost import encode_multipart_formdata, iter_fields
BOUNDARY = "!! test boundary !!"
BOUNDARY_BYTES = BOUNDARY.encode()
class TestIterfields:
def test_dict(self):
for fieldname, value in iter_fields(dict(a="b")):
assert (f... | expected | added | 6e0fb9fa4682d8db50fe4ee5ae6d3d9643a060ab0df1fb014c4780bc9ee8e5c0 | assert|test_explicit|import pytest from urllib3.fields import RequestField from urllib3.filepost import encode_multipart_formdata, iter_fields BOUNDARY = "!! test boundary !!" BOUNDARY_BYTES = BOUNDARY.encode() class TestIterfields: def test_dict(self): for fieldname, value in iter_fields(dict(a="b")): assert (fieldnam... | null | null | null |
urllib3/urllib3 | train | 425 | 5a1562cc5e7048ba9d7efd3be9b89f42bb6986bc | train | test/test_response.py | train | urllib3/urllib3:test/test_response.py | 105 | 8 | assert | test_reference_read | import contextlib
import http.client as httplib
import re
import socket
import ssl
import zlib
from base64 import b64decode
from io import BufferedReader, BytesIO, TextIOWrapper
from test import onlyBrotlipy
from unittest import mock
import pytest
from urllib3.exceptions import (
DecodeError,
IncompleteRead,
... | b"f" | modified | a3ce2a066ad668223b01032a8b9a177d3c62f8a98565c70a33f4cbe0a5c65aec | assert|test_reference_read|import contextlib import http.client as httplib import re import socket import ssl import zlib from base64 import b64decode from io import BufferedReader, BytesIO, TextIOWrapper from test import onlyBrotlipy from unittest import mock import pytest from urllib3.exceptions import ( DecodeError,... | b"f" | 106 | 8 |
urllib3/urllib3 | train | 425 | 5a1562cc5e7048ba9d7efd3be9b89f42bb6986bc | train | test/test_response.py | train | urllib3/urllib3:test/test_response.py | 158 | 8 | assert | test_chunked_decoding_deflate2 | import contextlib
import http.client as httplib
import re
import socket
import ssl
import zlib
from base64 import b64decode
from io import BufferedReader, BytesIO, TextIOWrapper
from test import onlyBrotlipy
from unittest import mock
import pytest
from urllib3.exceptions import (
DecodeError,
IncompleteRead,
... | b"oo" | modified | 3effa516a1c0a3b31154b5266aae61ead40fda3541f896e1bf22597c5c614bca | assert|test_chunked_decoding_deflate2|import contextlib import http.client as httplib import re import socket import ssl import zlib from base64 import b64decode from io import BufferedReader, BytesIO, TextIOWrapper from test import onlyBrotlipy from unittest import mock import pytest from urllib3.exceptions import ( D... | b"oo" | 159 | 8 |
urllib3/urllib3 | train | 425 | 5a1562cc5e7048ba9d7efd3be9b89f42bb6986bc | train | test/test_util.py | train | urllib3/urllib3:test/test_util.py | 330 | 13 | pytest.raises | test_parse_url_negative_port | import hashlib
import io
import logging
import socket
import ssl
import warnings
from itertools import chain
from test import notBrotlipy, onlyBrotlipy
from unittest.mock import Mock, patch
import pytest
from urllib3 import add_stderr_logger, disable_warnings, util
from urllib3.exceptions import (
InsecureRequest... | LocationParseError) | modified | 34b14f752f4375e2c104f025eb22e55f0e209a4e25285f361a804041b7b238f7 | pytest.raises|test_parse_url_negative_port|import hashlib import io import logging import socket import ssl import warnings from itertools import chain from test import notBrotlipy, onlyBrotlipy from unittest.mock import Mock, patch import pytest from urllib3 import add_stderr_logger, disable_warnings, util from urllib... | LocationParseError) | 329 | 13 |
urllib3/urllib3 | train | 425 | 5a1562cc5e7048ba9d7efd3be9b89f42bb6986bc | train | test/test_util.py | train | urllib3/urllib3:test/test_util.py | 736 | 8 | assert | test_connection_requires_http_tunnel_https_proxy | import hashlib
import io
import logging
import socket
import ssl
import warnings
from itertools import chain
from test import notBrotlipy, onlyBrotlipy
from unittest.mock import Mock, patch
import pytest
from urllib3 import add_stderr_logger, disable_warnings, util
from urllib3.exceptions import (
InsecureRequest... | not connection_requires_http_tunnel( proxy, proxy_config, destination_scheme ) | modified | f6ecb2c98a2b4618a31d7fdfc362321bb839c1ca8e7bd9856a8d5696a2f069e9 | assert|test_connection_requires_http_tunnel_https_proxy|import hashlib import io import logging import socket import ssl import warnings from itertools import chain from test import notBrotlipy, onlyBrotlipy from unittest.mock import Mock, patch import pytest from urllib3 import add_stderr_logger, disable_warnings, uti... | not connection_requires_http_tunnel( proxy, proxy_config, destination_scheme ) | 735 | 8 |
urllib3/urllib3 | train | 425 | 5a1562cc5e7048ba9d7efd3be9b89f42bb6986bc | train | test/with_dummyserver/test_connectionpool.py | train | urllib3/urllib3:test/with_dummyserver/test_connectionpool.py | 406 | 12 | assert | test_redirect | import io
import json
import logging
import socket
import sys
import time
import warnings
from test import LONG_TIMEOUT, SHORT_TIMEOUT
from threading import Event
from unittest import mock
from urllib.parse import urlencode
import pytest
from dummyserver.server import HAS_IPV6_AND_DNS, NoIPv6Warning
from dummyserver.... | b"Dummy server!" | modified | 1ca1095543713cd2cf11888eb38c1349e84b593a7cc41bbe712408703fad2246 | assert|test_redirect|import io import json import logging import socket import sys import time import warnings from test import LONG_TIMEOUT, SHORT_TIMEOUT from threading import Event from unittest import mock from urllib.parse import urlencode import pytest from dummyserver.server import HAS_IPV6_AND_DNS, NoIPv6Warnin... | b"Dummy server!" | 407 | 12 |
urllib3/urllib3 | train | 425 | 5a1562cc5e7048ba9d7efd3be9b89f42bb6986bc | train | test/with_dummyserver/test_https.py | train | urllib3/urllib3:test/with_dummyserver/test_https.py | 653 | 16 | assert | test_tls_protocol_name_of_socket | import datetime
import json
import logging
import os.path
import shutil
import ssl
import sys
import tempfile
import warnings
from test import (
LONG_TIMEOUT,
SHORT_TIMEOUT,
TARPIT_HOST,
notOpenSSL098,
notSecureTransport,
requires_network,
requires_ssl_context_keyfile_password,
resolvesL... | self.tls_protocol_name | added | 0aac526c4f4f248c8cfa698319abb257db9c793020bbfb3e5ee9a098cf0a0ddd | assert|test_tls_protocol_name_of_socket|import datetime import json import logging import os.path import shutil import ssl import sys import tempfile import warnings from test import ( LONG_TIMEOUT, SHORT_TIMEOUT, TARPIT_HOST, notOpenSSL098, notSecureTransport, requires_network, requires_ssl_context_keyfile_password, r... | null | null | null |
urllib3/urllib3 | train | 426 | 494213c96915c6e420d6cce9c59fa99a6b621f33 | train | noxfile.py | test | urllib3/urllib3:noxfile.py | 83 | 4 | assert | import os
import shutil
import subprocess
import nox
# Whenever type-hints are completed on a file it should be added here so that
# this file will continue to be checked by mypy. Errors from other files are
# ignored.
TYPED_FILES = {
"src/urllib3/contrib/__init__.py",
"src/urllib3/exceptions.py",
"src/ur... | process.stderr | added | 9552ff42e051b445d0bb7e54e8fa8b70ab398d52b73e7e571321b889bc1e7dc4 | assert||import os import shutil import subprocess import nox # Whenever type-hints are completed on a file it should be added here so that # this file will continue to be checked by mypy. Errors from other files are # ignored. TYPED_FILES = { "src/urllib3/contrib/__init__.py", "src/urllib3/exceptions.py", "src/urllib3/... | null | null | null | |
urllib3/urllib3 | train | 427 | c67c0949e9c91c7621ea718a7f297ecac7c3b79e | train | test/test_retry.py | train | urllib3/urllib3:test/test_retry.py | 21 | 8 | assert | test_string | from unittest import mock
import pytest
from urllib3.exceptions import (
ConnectTimeoutError,
InvalidHeader,
MaxRetryError,
ReadTimeoutError,
ResponseError,
SSLError,
)
from urllib3.response import HTTPResponse
from urllib3.util.retry import RequestHistory, Retry
class TestRetry:
def tes... | "Retry(total=10, connect=None, read=None, redirect=None, status=None)" | added | a6632f6000b265035d2ca8e7b8ed33fa4b759b851ac6306cb029183fb750c1e7 | assert|test_string|from unittest import mock import pytest from urllib3.exceptions import ( ConnectTimeoutError, InvalidHeader, MaxRetryError, ReadTimeoutError, ResponseError, SSLError, ) from urllib3.response import HTTPResponse from urllib3.util.retry import RequestHistory, Retry class TestRetry: def test_string(self... | null | null | null |
urllib3/urllib3 | train | 427 | c67c0949e9c91c7621ea718a7f297ecac7c3b79e | train | test/test_retry.py | train | urllib3/urllib3:test/test_retry.py | 75 | 8 | assert | test_retry_total_none | from unittest import mock
import pytest
from urllib3.exceptions import (
ConnectTimeoutError,
InvalidHeader,
MaxRetryError,
ReadTimeoutError,
ResponseError,
SSLError,
)
from urllib3.response import HTTPResponse
from urllib3.util.retry import RequestHistory, Retry
class TestRetry:
def tes... | not retry.is_exhausted() | added | 8975ff9e07ec36b67ca9ef98e66dfd7f815ab6bfd4b0c28a05737d6c84133ce5 | assert|test_retry_total_none|from unittest import mock import pytest from urllib3.exceptions import ( ConnectTimeoutError, InvalidHeader, MaxRetryError, ReadTimeoutError, ResponseError, SSLError, ) from urllib3.response import HTTPResponse from urllib3.util.retry import RequestHistory, Retry class TestRetry: def test_s... | null | null | null |
urllib3/urllib3 | train | 427 | c67c0949e9c91c7621ea718a7f297ecac7c3b79e | train | test/test_retry.py | train | urllib3/urllib3:test/test_retry.py | 119 | 8 | assert | test_retry_read_zero | from unittest import mock
import pytest
from urllib3.exceptions import (
ConnectTimeoutError,
InvalidHeader,
MaxRetryError,
ReadTimeoutError,
ResponseError,
SSLError,
)
from urllib3.response import HTTPResponse
from urllib3.util.retry import RequestHistory, Retry
class TestRetry:
def tes... | error | added | d39566142a7687cf21609853ad6b9c474b044292a739bbd38e1cef022cf654a4 | assert|test_retry_read_zero|from unittest import mock import pytest from urllib3.exceptions import ( ConnectTimeoutError, InvalidHeader, MaxRetryError, ReadTimeoutError, ResponseError, SSLError, ) from urllib3.response import HTTPResponse from urllib3.util.retry import RequestHistory, Retry class TestRetry: def test_st... | null | null | null |
urllib3/urllib3 | train | 427 | c67c0949e9c91c7621ea718a7f297ecac7c3b79e | train | test/test_retry.py | train | urllib3/urllib3:test/test_retry.py | 258 | 8 | assert | test_history | from unittest import mock
import pytest
from urllib3.exceptions import (
ConnectTimeoutError,
InvalidHeader,
MaxRetryError,
ReadTimeoutError,
ResponseError,
SSLError,
)
from urllib3.response import HTTPResponse
from urllib3.util.retry import RequestHistory, Retry
class TestRetry:
def tes... | history | added | dcda5e0916b9c4750320e83de5f3b07589b02ce898513493c8c353a34daef336 | assert|test_history|from unittest import mock import pytest from urllib3.exceptions import ( ConnectTimeoutError, InvalidHeader, MaxRetryError, ReadTimeoutError, ResponseError, SSLError, ) from urllib3.response import HTTPResponse from urllib3.util.retry import RequestHistory, Retry class TestRetry: def test_string(sel... | null | null | null |
urllib3/urllib3 | train | 427 | c67c0949e9c91c7621ea718a7f297ecac7c3b79e | train | test/with_dummyserver/test_connectionpool.py | train | urllib3/urllib3:test/with_dummyserver/test_connectionpool.py | 1,111 | 12 | assert | test_retry_return_in_response | import io
import json
import logging
import socket
import sys
import time
import warnings
from test import LONG_TIMEOUT, SHORT_TIMEOUT
from threading import Event
from unittest import mock
from urllib.parse import urlencode
import pytest
from dummyserver.server import HAS_IPV6_AND_DNS, NoIPv6Warning
from dummyserver.... | ( RequestHistory("GET", "/successful_retry", None, 418, None), ) | modified | 5b98702eb212aa48f3d53d69581c19b39fc5e4cfe2113175fc36f3a0f2091d2a | assert|test_retry_return_in_response|import io import json import logging import socket import sys import time import warnings from test import LONG_TIMEOUT, SHORT_TIMEOUT from threading import Event from unittest import mock from urllib.parse import urlencode import pytest from dummyserver.server import HAS_IPV6_AND_D... | ( RequestHistory("GET", "/successful_retry", None, 418, None), ) | 1,111 | 12 |
urllib3/urllib3 | train | 427 | c67c0949e9c91c7621ea718a7f297ecac7c3b79e | train | test/with_dummyserver/test_connectionpool.py | train | urllib3/urllib3:test/with_dummyserver/test_connectionpool.py | 1,119 | 12 | assert | test_retry_redirect_history | import io
import json
import logging
import socket
import sys
import time
import warnings
from test import LONG_TIMEOUT, SHORT_TIMEOUT
from threading import Event
from unittest import mock
from urllib.parse import urlencode
import pytest
from dummyserver.server import HAS_IPV6_AND_DNS, NoIPv6Warning
from dummyserver.... | ( RequestHistory("GET", "/redirect?target=%2F", None, 303, "/"), ) | modified | d2d5f7bfcccfc12654bb87849f692e22e30c09557aba01a60cc68af40a25bd8e | assert|test_retry_redirect_history|import io import json import logging import socket import sys import time import warnings from test import LONG_TIMEOUT, SHORT_TIMEOUT from threading import Event from unittest import mock from urllib.parse import urlencode import pytest from dummyserver.server import HAS_IPV6_AND_DNS... | ( RequestHistory("GET", "/redirect?target=%2F", None, 303, "/"), ) | 1,119 | 12 |
urllib3/urllib3 | train | 427 | c67c0949e9c91c7621ea718a7f297ecac7c3b79e | train | test/with_dummyserver/test_connectionpool.py | train | urllib3/urllib3:test/with_dummyserver/test_connectionpool.py | 1,142 | 12 | assert | test_multi_redirect_history | import io
import json
import logging
import socket
import sys
import time
import warnings
from test import LONG_TIMEOUT, SHORT_TIMEOUT
from threading import Event
from unittest import mock
from urllib.parse import urlencode
import pytest
from dummyserver.server import HAS_IPV6_AND_DNS, NoIPv6Warning
from dummyserver.... | b"Done redirecting" | modified | 802ab37a881d92678bfbd07a20e9e29212259fb55c1537d28b3f7d6c5acb7899 | assert|test_multi_redirect_history|import io import json import logging import socket import sys import time import warnings from test import LONG_TIMEOUT, SHORT_TIMEOUT from threading import Event from unittest import mock from urllib.parse import urlencode import pytest from dummyserver.server import HAS_IPV6_AND_DNS... | b"Done redirecting" | 1,142 | 12 |
urllib3/urllib3 | train | 427 | c67c0949e9c91c7621ea718a7f297ecac7c3b79e | train | test/with_dummyserver/test_connectionpool.py | train | urllib3/urllib3:test/with_dummyserver/test_connectionpool.py | 1,291 | 12 | assert | test_redirect_put_file | import io
import json
import logging
import socket
import sys
import time
import warnings
from test import LONG_TIMEOUT, SHORT_TIMEOUT
from threading import Event
from unittest import mock
from urllib.parse import urlencode
import pytest
from dummyserver.server import HAS_IPV6_AND_DNS, NoIPv6Warning
from dummyserver.... | data | modified | 1a0eef4d8f05d49fe59b755a99f724eeb1db3e0dd07ae95029cbf2ded4602ee8 | assert|test_redirect_put_file|import io import json import logging import socket import sys import time import warnings from test import LONG_TIMEOUT, SHORT_TIMEOUT from threading import Event from unittest import mock from urllib.parse import urlencode import pytest from dummyserver.server import HAS_IPV6_AND_DNS, NoI... | data | 1,291 | 12 |
urllib3/urllib3 | train | 428 | 6d607d400fdea62ced01a835486433392e3422fb | train | test/test_util.py | train | urllib3/urllib3:test/test_util.py | 475 | 8 | assert | test_make_headers | import io
import logging
import socket
import ssl
import warnings
from itertools import chain
from test import notBrotlipy, onlyBrotlipy
from unittest.mock import Mock, patch
import pytest
from urllib3 import add_stderr_logger, disable_warnings, util
from urllib3.exceptions import (
InsecureRequestWarning,
Lo... | expected | added | d59ed3192d53977215c3acaddc41ff6cac63fcfd97060e9d0f5146fca8b94c83 | assert|test_make_headers|import io import logging import socket import ssl import warnings from itertools import chain from test import notBrotlipy, onlyBrotlipy from unittest.mock import Mock, patch import pytest from urllib3 import add_stderr_logger, disable_warnings, util from urllib3.exceptions import ( InsecureReq... | null | null | null |
urllib3/urllib3 | train | 428 | 6d607d400fdea62ced01a835486433392e3422fb | train | test/test_util.py | train | urllib3/urllib3:test/test_util.py | 528 | 8 | assert | test_split_first | import io
import logging
import socket
import ssl
import warnings
from itertools import chain
from test import notBrotlipy, onlyBrotlipy
from unittest.mock import Mock, patch
import pytest
from urllib3 import add_stderr_logger, disable_warnings, util
from urllib3.exceptions import (
InsecureRequestWarning,
Lo... | expected | added | c837cf426c7097663eeb7232451b1e0b6a1917ed9e0a296a0772b63341fe2773 | assert|test_split_first|import io import logging import socket import ssl import warnings from itertools import chain from test import notBrotlipy, onlyBrotlipy from unittest.mock import Mock, patch import pytest from urllib3 import add_stderr_logger, disable_warnings, util from urllib3.exceptions import ( InsecureRequ... | null | null | null |
urllib3/urllib3 | train | 428 | 6d607d400fdea62ced01a835486433392e3422fb | train | test/test_util.py | train | urllib3/urllib3:test/test_util.py | 686 | 12 | assert | test_ip_family_ipv6_enabled | import io
import logging
import socket
import ssl
import warnings
from itertools import chain
from test import notBrotlipy, onlyBrotlipy
from unittest.mock import Mock, patch
import pytest
from urllib3 import add_stderr_logger, disable_warnings, util
from urllib3.exceptions import (
InsecureRequestWarning,
Lo... | socket.AF_UNSPEC | added | f7b9fdb84c96be087e49bf54e1b1ee50e7067db56fc439c5f1724fffe9e2a95b | assert|test_ip_family_ipv6_enabled|import io import logging import socket import ssl import warnings from itertools import chain from test import notBrotlipy, onlyBrotlipy from unittest.mock import Mock, patch import pytest from urllib3 import add_stderr_logger, disable_warnings, util from urllib3.exceptions import ( I... | null | null | null |
urllib3/urllib3 | train | 428 | 6d607d400fdea62ced01a835486433392e3422fb | train | test/test_util.py | train | urllib3/urllib3:test/test_util.py | 809 | 8 | assert | test_resolve_cert_reqs | import io
import logging
import socket
import ssl
import warnings
from itertools import chain
from test import notBrotlipy, onlyBrotlipy
from unittest.mock import Mock, patch
import pytest
from urllib3 import add_stderr_logger, disable_warnings, util
from urllib3.exceptions import (
InsecureRequestWarning,
Lo... | requirements | added | 667761fae08197dff9bb2ef92aa112ddfa87353d7d97d48cec71348fd49d9692 | assert|test_resolve_cert_reqs|import io import logging import socket import ssl import warnings from itertools import chain from test import notBrotlipy, onlyBrotlipy from unittest.mock import Mock, patch import pytest from urllib3 import add_stderr_logger, disable_warnings, util from urllib3.exceptions import ( Insecu... | null | null | null |
urllib3/urllib3 | train | 429 | cad4850614d86b4db56a785bc9f984eed342f8be | train | test/test_response.py | train | urllib3/urllib3:test/test_response.py | 84 | 8 | assert | test_preload | import contextlib
import http.client as httplib
import re
import socket
import ssl
import zlib
from base64 import b64decode
from io import BufferedReader, BytesIO, TextIOWrapper
from test import onlyBrotlipy
from unittest import mock
import pytest
from urllib3.exceptions import (
DecodeError,
IncompleteRead,
... | len(b"foo") | modified | 2e9822f55457f788ff183b1d7525754774bf578a9c1cef82581144d08c75356b | assert|test_preload|import contextlib import http.client as httplib import re import socket import ssl import zlib from base64 import b64decode from io import BufferedReader, BytesIO, TextIOWrapper from test import onlyBrotlipy from unittest import mock import pytest from urllib3.exceptions import ( DecodeError, Incomp... | len(b"foo") | 84 | 8 |
urllib3/urllib3 | train | 429 | cad4850614d86b4db56a785bc9f984eed342f8be | train | test/test_response.py | train | urllib3/urllib3:test/test_response.py | 246 | 8 | assert | test_chunked_decoding_brotli | import contextlib
import http.client as httplib
import re
import socket
import ssl
import zlib
from base64 import b64decode
from io import BufferedReader, BytesIO, TextIOWrapper
from test import onlyBrotlipy
from unittest import mock
import pytest
from urllib3.exceptions import (
DecodeError,
IncompleteRead,
... | b"foobarbaz" | modified | c138e18727cd249d57edaae6ad27cf8e0060f87eda3ebee553be616ff274c787 | assert|test_chunked_decoding_brotli|import contextlib import http.client as httplib import re import socket import ssl import zlib from base64 import b64decode from io import BufferedReader, BytesIO, TextIOWrapper from test import onlyBrotlipy from unittest import mock import pytest from urllib3.exceptions import ( Dec... | b"foobarbaz" | 246 | 8 |
urllib3/urllib3 | train | 429 | cad4850614d86b4db56a785bc9f984eed342f8be | train | test/test_response.py | train | urllib3/urllib3:test/test_response.py | 390 | 8 | assert | test_io_not_autoclose_bufferedreader | import contextlib
import http.client as httplib
import re
import socket
import ssl
import zlib
from base64 import b64decode
from io import BufferedReader, BytesIO, TextIOWrapper
from test import onlyBrotlipy
from unittest import mock
import pytest
from urllib3.exceptions import (
DecodeError,
IncompleteRead,
... | resp.closed | modified | 8cd9eb03f6ce5704615b1e2b2e5a28a191bdc032afc63e0aaf5d1bed309378a8 | assert|test_io_not_autoclose_bufferedreader|import contextlib import http.client as httplib import re import socket import ssl import zlib from base64 import b64decode from io import BufferedReader, BytesIO, TextIOWrapper from test import onlyBrotlipy from unittest import mock import pytest from urllib3.exceptions impo... | resp.closed | 390 | 8 |
urllib3/urllib3 | train | 429 | cad4850614d86b4db56a785bc9f984eed342f8be | train | test/test_response.py | train | urllib3/urllib3:test/test_response.py | 950 | 12 | assert | test_non_timeout_ssl_error_on_read | import contextlib
import http.client as httplib
import re
import socket
import ssl
import zlib
from base64 import b64decode
from io import BufferedReader, BytesIO, TextIOWrapper
from test import onlyBrotlipy
from unittest import mock
import pytest
from urllib3.exceptions import (
DecodeError,
IncompleteRead,
... | mac_error | modified | eed9d0af0172905e5433e3b6f272be44c8a826f168590e09da03afaff1afaa5b | assert|test_non_timeout_ssl_error_on_read|import contextlib import http.client as httplib import re import socket import ssl import zlib from base64 import b64decode from io import BufferedReader, BytesIO, TextIOWrapper from test import onlyBrotlipy from unittest import mock import pytest from urllib3.exceptions import... | mac_error | 950 | 12 |
urllib3/urllib3 | train | 431 | 2dcfde7bce57d7c0f997dc95d1e2c8fa977595b0 | train | test/with_dummyserver/test_proxy_poolmanager.py | train | urllib3/urllib3:test/with_dummyserver/test_proxy_poolmanager.py | 91 | 17 | pytest.raises | test_https_proxy_pyopenssl_not_supported | import json
import os.path
import shutil
import socket
import tempfile
from test import LONG_TIMEOUT, SHORT_TIMEOUT, onlySecureTransport, withPyOpenSSL
import pytest
import trustme
from dummyserver.server import DEFAULT_CA, HAS_IPV6, get_unreachable_address
from dummyserver.testcase import HTTPDummyProxyTestCase, IPv... | ProxySchemeUnsupported) | modified | 343b29d3520f1d02f50814272d8a3802f0c5e4ce8dbabba06d168e01823f5855 | pytest.raises|test_https_proxy_pyopenssl_not_supported|import json import os.path import shutil import socket import tempfile from test import LONG_TIMEOUT, SHORT_TIMEOUT, onlySecureTransport, withPyOpenSSL import pytest import trustme from dummyserver.server import DEFAULT_CA, HAS_IPV6, get_unreachable_address from du... | ProxySchemeUnsupported) | 90 | 17 |
urllib3/urllib3 | train | 431 | 2dcfde7bce57d7c0f997dc95d1e2c8fa977595b0 | train | test/with_dummyserver/test_proxy_poolmanager.py | train | urllib3/urllib3:test/with_dummyserver/test_proxy_poolmanager.py | 102 | 17 | pytest.raises | test_https_proxy_securetransport_not_supported | import json
import os.path
import shutil
import socket
import tempfile
from test import LONG_TIMEOUT, SHORT_TIMEOUT, onlySecureTransport, withPyOpenSSL
import pytest
import trustme
from dummyserver.server import DEFAULT_CA, HAS_IPV6, get_unreachable_address
from dummyserver.testcase import HTTPDummyProxyTestCase, IPv... | ProxySchemeUnsupported) | modified | 502034ddfa8fa305e940ae4b3adf1e95a7f3b32d012827f2b6d0ca42f3ba7b28 | pytest.raises|test_https_proxy_securetransport_not_supported|import json import os.path import shutil import socket import tempfile from test import LONG_TIMEOUT, SHORT_TIMEOUT, onlySecureTransport, withPyOpenSSL import pytest import trustme from dummyserver.server import DEFAULT_CA, HAS_IPV6, get_unreachable_address f... | ProxySchemeUnsupported) | 101 | 17 |
urllib3/urllib3 | train | 431 | 2dcfde7bce57d7c0f997dc95d1e2c8fa977595b0 | train | test/with_dummyserver/test_proxy_poolmanager.py | train | urllib3/urllib3:test/with_dummyserver/test_proxy_poolmanager.py | 351 | 12 | assert | test_https_headers | import json
import os.path
import shutil
import socket
import tempfile
from test import LONG_TIMEOUT, SHORT_TIMEOUT, onlySecureTransport, withPyOpenSSL
import pytest
import trustme
from dummyserver.server import DEFAULT_CA, HAS_IPV6, get_unreachable_address
from dummyserver.testcase import HTTPDummyProxyTestCase, IPv... | None | modified | 0debe82db58ae7b4fdbeb98865049fab4668483d1596614032f292e191530c25 | assert|test_https_headers|import json import os.path import shutil import socket import tempfile from test import LONG_TIMEOUT, SHORT_TIMEOUT, onlySecureTransport, withPyOpenSSL import pytest import trustme from dummyserver.server import DEFAULT_CA, HAS_IPV6, get_unreachable_address from dummyserver.testcase import HTT... | None | 350 | 12 |
urllib3/urllib3 | train | 431 | 2dcfde7bce57d7c0f997dc95d1e2c8fa977595b0 | train | test/with_dummyserver/test_proxy_poolmanager.py | train | urllib3/urllib3:test/with_dummyserver/test_proxy_poolmanager.py | 443 | 12 | assert | test_https_proxy_pool_timeout | import json
import os.path
import shutil
import socket
import tempfile
from test import LONG_TIMEOUT, SHORT_TIMEOUT, onlySecureTransport, withPyOpenSSL
import pytest
import trustme
from dummyserver.server import DEFAULT_CA, HAS_IPV6, get_unreachable_address
from dummyserver.testcase import HTTPDummyProxyTestCase, IPv... | ConnectTimeoutError | modified | 522488fbc610015aa8b05883011d2e3a948af601aef9d29e59ae339ad059e85c | assert|test_https_proxy_pool_timeout|import json import os.path import shutil import socket import tempfile from test import LONG_TIMEOUT, SHORT_TIMEOUT, onlySecureTransport, withPyOpenSSL import pytest import trustme from dummyserver.server import DEFAULT_CA, HAS_IPV6, get_unreachable_address from dummyserver.testcase... | ConnectTimeoutError | 442 | 12 |
urllib3/urllib3 | train | 432 | fd0c475cc2c51aedb6c89d7b9be58d850966ee6a | train | test/contrib/test_pyopenssl.py | train | urllib3/urllib3:test/contrib/test_pyopenssl.py | 63 | 8 | assert | test_dnsname_to_stdlib_simple | import os
from unittest import mock
import pytest
try:
from cryptography import x509
from OpenSSL.crypto import FILETYPE_PEM, load_certificate
from urllib3.contrib.pyopenssl import _dnsname_to_stdlib, get_subj_alt_name
except ImportError:
pass
def setup_module():
try:
from urllib3.contr... | expected_result | modified | ef5a0c8331c78679c2f4bd4aecce2b5517277b0118c32b9dc63feec6fc63aea8 | assert|test_dnsname_to_stdlib_simple|import os from unittest import mock import pytest try: from cryptography import x509 from OpenSSL.crypto import FILETYPE_PEM, load_certificate from urllib3.contrib.pyopenssl import _dnsname_to_stdlib, get_subj_alt_name except ImportError: pass def setup_module(): try: from urllib3.c... | expected_result | 65 | 8 |
urllib3/urllib3 | train | 432 | fd0c475cc2c51aedb6c89d7b9be58d850966ee6a | train | test/contrib/test_pyopenssl.py | train | urllib3/urllib3:test/contrib/test_pyopenssl.py | 72 | 8 | assert | test_dnsname_to_stdlib_leading_period | import os
from unittest import mock
import pytest
try:
from cryptography import x509
from OpenSSL.crypto import FILETYPE_PEM, load_certificate
from urllib3.contrib.pyopenssl import _dnsname_to_stdlib, get_subj_alt_name
except ImportError:
pass
def setup_module():
try:
from urllib3.contr... | expected_result | modified | 59327a555016eeb820bb6029d8d025c1a6d32159f4414beccec12640cc013ddf | assert|test_dnsname_to_stdlib_leading_period|import os from unittest import mock import pytest try: from cryptography import x509 from OpenSSL.crypto import FILETYPE_PEM, load_certificate from urllib3.contrib.pyopenssl import _dnsname_to_stdlib, get_subj_alt_name except ImportError: pass def setup_module(): try: from u... | expected_result | 74 | 8 |
urllib3/urllib3 | train | 432 | fd0c475cc2c51aedb6c89d7b9be58d850966ee6a | train | test/contrib/test_pyopenssl.py | train | urllib3/urllib3:test/contrib/test_pyopenssl.py | 82 | 8 | assert | test_dnsname_to_stdlib_leading_splat | import os
from unittest import mock
import pytest
try:
from cryptography import x509
from OpenSSL.crypto import FILETYPE_PEM, load_certificate
from urllib3.contrib.pyopenssl import _dnsname_to_stdlib, get_subj_alt_name
except ImportError:
pass
def setup_module():
try:
from urllib3.contr... | expected_result | modified | 310a3324913713faa51c6f0fd99e8b336ad7d895d2c1ec60386a94c5a5eff4ee | assert|test_dnsname_to_stdlib_leading_splat|import os from unittest import mock import pytest try: from cryptography import x509 from OpenSSL.crypto import FILETYPE_PEM, load_certificate from urllib3.contrib.pyopenssl import _dnsname_to_stdlib, get_subj_alt_name except ImportError: pass def setup_module(): try: from ur... | expected_result | 84 | 8 |
urllib3/urllib3 | train | 432 | fd0c475cc2c51aedb6c89d7b9be58d850966ee6a | train | test/contrib/test_pyopenssl.py | train | urllib3/urllib3:test/contrib/test_pyopenssl.py | 97 | 8 | assert | test_get_subj_alt_name | import os
from unittest import mock
import pytest
try:
from cryptography import x509
from OpenSSL.crypto import FILETYPE_PEM, load_certificate
from urllib3.contrib.pyopenssl import _dnsname_to_stdlib, get_subj_alt_name
except ImportError:
pass
def setup_module():
try:
from urllib3.contr... | isinstance(mock_warning.call_args[0][1], x509.DuplicateExtension) | modified | fd7d161c4e565b41adf3f33306b16c3f04e35aac5f530e59bccbfa51325be92f | assert|test_get_subj_alt_name|import os from unittest import mock import pytest try: from cryptography import x509 from OpenSSL.crypto import FILETYPE_PEM, load_certificate from urllib3.contrib.pyopenssl import _dnsname_to_stdlib, get_subj_alt_name except ImportError: pass def setup_module(): try: from urllib3.contrib.... | isinstance(mock_warning.call_args[0][1], x509.DuplicateExtension) | 99 | 8 |
urllib3/urllib3 | train | 432 | fd0c475cc2c51aedb6c89d7b9be58d850966ee6a | train | test/test_connection.py | test | urllib3/urllib3:test/test_connection.py | 21 | 13 | pytest.raises | test_match_hostname_no_cert | import datetime
from unittest import mock
import pytest
from urllib3.connection import RECENT_DATE, CertificateError, _match_hostname
from urllib3.packages.ssl_match_hostname._implementation import (
CertificateError as ImplementationCertificateError,
)
from urllib3.packages.ssl_match_hostname._implementation imp... | ValueError) | added | 7807fd72532b752f2aeafe7d9f99c3fa0b75416bd0fe88481ad2199e4ddc38c8 | pytest.raises|test_match_hostname_no_cert|import datetime from unittest import mock import pytest from urllib3.connection import RECENT_DATE, CertificateError, _match_hostname from urllib3.packages.ssl_match_hostname._implementation import ( CertificateError as ImplementationCertificateError, ) from urllib3.packages.ss... | null | null | null |
urllib3/urllib3 | train | 432 | fd0c475cc2c51aedb6c89d7b9be58d850966ee6a | train | test/test_connection.py | test | urllib3/urllib3:test/test_connection.py | 27 | 13 | pytest.raises | test_match_hostname_empty_cert | import datetime
from unittest import mock
import pytest
from urllib3.connection import RECENT_DATE, CertificateError, _match_hostname
from urllib3.packages.ssl_match_hostname._implementation import (
CertificateError as ImplementationCertificateError,
)
from urllib3.packages.ssl_match_hostname._implementation imp... | ValueError) | added | 428a9ce98cad435ca0ab4588ece29b975265006b7e6c9fe4989fe2b7baa167af | pytest.raises|test_match_hostname_empty_cert|import datetime from unittest import mock import pytest from urllib3.connection import RECENT_DATE, CertificateError, _match_hostname from urllib3.packages.ssl_match_hostname._implementation import ( CertificateError as ImplementationCertificateError, ) from urllib3.packages... | null | null | null |
urllib3/urllib3 | train | 432 | fd0c475cc2c51aedb6c89d7b9be58d850966ee6a | train | test/test_connection.py | test | urllib3/urllib3:test/test_connection.py | 48 | 12 | assert | test_match_hostname_mismatch | import datetime
from unittest import mock
import pytest
from urllib3.connection import RECENT_DATE, CertificateError, _match_hostname
from urllib3.packages.ssl_match_hostname._implementation import (
CertificateError as ImplementationCertificateError,
)
from urllib3.packages.ssl_match_hostname._implementation imp... | cert | added | af4b8178ccc064990d42aa813ee4363e62a6768e9c3dcce955239cbb9e2c4205 | assert|test_match_hostname_mismatch|import datetime from unittest import mock import pytest from urllib3.connection import RECENT_DATE, CertificateError, _match_hostname from urllib3.packages.ssl_match_hostname._implementation import ( CertificateError as ImplementationCertificateError, ) from urllib3.packages.ssl_matc... | null | null | null |
urllib3/urllib3 | train | 432 | fd0c475cc2c51aedb6c89d7b9be58d850966ee6a | train | test/test_connection.py | test | urllib3/urllib3:test/test_connection.py | 65 | 8 | assert | test_recent_date | import datetime
from unittest import mock
import pytest
from urllib3.connection import RECENT_DATE, CertificateError, _match_hostname
from urllib3.packages.ssl_match_hostname._implementation import (
CertificateError as ImplementationCertificateError,
)
from urllib3.packages.ssl_match_hostname._implementation imp... | (datetime.datetime.today() - two_years).date() | added | 74065e76c6d632dc255efe7d3c3daee85fab23c2fec2dcdc43775fca6a406265 | assert|test_recent_date|import datetime from unittest import mock import pytest from urllib3.connection import RECENT_DATE, CertificateError, _match_hostname from urllib3.packages.ssl_match_hostname._implementation import ( CertificateError as ImplementationCertificateError, ) from urllib3.packages.ssl_match_hostname._... | null | null | null |
urllib3/urllib3 | train | 434 | 4cf9a72161e304c7ce35215d6b0a5cfd03d18b1a | train | test/contrib/test_socks.py | train | urllib3/urllib3:test/contrib/test_socks.py | 357 | 17 | pytest.raises | test_connection_failure | from __future__ import absolute_import
import socket
import threading
from socket import getaddrinfo as real_getaddrinfo
from test import SHORT_TIMEOUT
import pytest
import socks as py_socks
from dummyserver.server import DEFAULT_CA, DEFAULT_CERTS
from dummyserver.testcase import IPV4SocketDummyServerTestCase
from u... | NewConnectionError) | modified | fe154c2560143040de793d04e25bc5297a27f23d35c35ec5385834ae5cd11dc0 | pytest.raises|test_connection_failure|from __future__ import absolute_import import socket import threading from socket import getaddrinfo as real_getaddrinfo from test import SHORT_TIMEOUT import pytest import socks as py_socks from dummyserver.server import DEFAULT_CA, DEFAULT_CERTS from dummyserver.testcase import I... | NewConnectionError) | 358 | 17 |
urllib3/urllib3 | train | 434 | 4cf9a72161e304c7ce35215d6b0a5cfd03d18b1a | train | test/test_collections.py | train | urllib3/urllib3:test/test_collections.py | 330 | 8 | assert | test_dict_conversion | import pytest
from urllib3._collections import HTTPHeaderDict
from urllib3._collections import RecentlyUsedContainer as Container
class TestLRUContainer:
def test_maxsize(self):
d = Container(5)
for i in range(5):
d[i] = str(i)
assert len(d) == 5
for i in range(5):
... | dict(HTTPHeaderDict(hdict)) | modified | 7179917848bb45f50281520794145fd6ed049bb6bba5afea2467c22b7b1a0988 | assert|test_dict_conversion|import pytest from urllib3._collections import HTTPHeaderDict from urllib3._collections import RecentlyUsedContainer as Container class TestLRUContainer: def test_maxsize(self): d = Container(5) for i in range(5): d[i] = str(i) assert len(d) == 5 for i in range(5): assert d[i] == str(i) d[i ... | dict(HTTPHeaderDict(hdict)) | 329 | 8 |
urllib3/urllib3 | train | 434 | 4cf9a72161e304c7ce35215d6b0a5cfd03d18b1a | train | test/test_response.py | train | urllib3/urllib3:test/test_response.py | 283 | 8 | assert | test_multi_decoding_gzip_gzip | import contextlib
import http.client as httplib
import socket
import ssl
import zlib
from base64 import b64decode
from io import BufferedReader, BytesIO, TextIOWrapper
from test import onlyBrotlipy
from unittest import mock
import pytest
from urllib3.exceptions import (
DecodeError,
IncompleteRead,
Invali... | b"foo" | modified | 784d4b9cc56afd6bac80ff30c8dc3dc446d02d78b066d65201bf1f87b256d6f1 | assert|test_multi_decoding_gzip_gzip|import contextlib import http.client as httplib import socket import ssl import zlib from base64 import b64decode from io import BufferedReader, BytesIO, TextIOWrapper from test import onlyBrotlipy from unittest import mock import pytest from urllib3.exceptions import ( DecodeError,... | b"foo" | 284 | 8 |
urllib3/urllib3 | train | 434 | 4cf9a72161e304c7ce35215d6b0a5cfd03d18b1a | train | test/test_retry.py | train | urllib3/urllib3:test/test_retry.py | 209 | 8 | assert | test_exhausted | from unittest import mock
import pytest
from urllib3.exceptions import (
ConnectTimeoutError,
InvalidHeader,
MaxRetryError,
ReadTimeoutError,
ResponseError,
SSLError,
)
from urllib3.response import HTTPResponse
from urllib3.util.retry import RequestHistory, Retry
class TestRetry:
def tes... | Retry(-1).is_exhausted() | modified | fe8121c7288cfcc733f04969151adf2300e7d7fa9300502fa1d79a979c1f2b52 | assert|test_exhausted|from unittest import mock import pytest from urllib3.exceptions import ( ConnectTimeoutError, InvalidHeader, MaxRetryError, ReadTimeoutError, ResponseError, SSLError, ) from urllib3.response import HTTPResponse from urllib3.util.retry import RequestHistory, Retry class TestRetry: def test_string(s... | Retry(-1).is_exhausted() | 211 | 8 |
urllib3/urllib3 | train | 434 | 4cf9a72161e304c7ce35215d6b0a5cfd03d18b1a | train | test/test_util.py | train | urllib3/urllib3:test/test_util.py | 694 | 12 | assert_* | test_assert_header_parsing_throws_typeerror_with_non_headers | import io
import logging
import socket
import ssl
import warnings
from itertools import chain
from test import notBrotlipy, onlyBrotlipy
from unittest.mock import Mock, patch
import pytest
from urllib3 import add_stderr_logger, disable_warnings, util
from urllib3.exceptions import (
InsecureRequestWarning,
Lo... | headers) | modified | 6578464f2af40cb0e508a32d738737f1bb1731ee434b247c713409d460f21ad0 | assert_*|test_assert_header_parsing_throws_typeerror_with_non_headers|import io import logging import socket import ssl import warnings from itertools import chain from test import notBrotlipy, onlyBrotlipy from unittest.mock import Mock, patch import pytest from urllib3 import add_stderr_logger, disable_warnings, util... | headers) | 695 | 12 |
urllib3/urllib3 | train | 434 | 4cf9a72161e304c7ce35215d6b0a5cfd03d18b1a | train | test/with_dummyserver/test_connectionpool.py | train | urllib3/urllib3:test/with_dummyserver/test_connectionpool.py | 1,153 | 12 | assert | test_multi_redirect_history | import io
import json
import logging
import socket
import sys
import time
import warnings
from test import LONG_TIMEOUT, SHORT_TIMEOUT
from threading import Event
from unittest import mock
from urllib.parse import urlencode
import pytest
from dummyserver.server import HAS_IPV6_AND_DNS, NoIPv6Warning
from dummyserver.... | expected | modified | 290ae27e1fbc4a9b0768a6fac22389a519710ea7b8ad45a7951b9587f7d8fe23 | assert|test_multi_redirect_history|import io import json import logging import socket import sys import time import warnings from test import LONG_TIMEOUT, SHORT_TIMEOUT from threading import Event from unittest import mock from urllib.parse import urlencode import pytest from dummyserver.server import HAS_IPV6_AND_DNS... | expected | 1,155 | 12 |
urllib3/urllib3 | train | 434 | 4cf9a72161e304c7ce35215d6b0a5cfd03d18b1a | train | test/with_dummyserver/test_https.py | train | urllib3/urllib3:test/with_dummyserver/test_https.py | 331 | 16 | assert | test_unverified_ssl | import datetime
import json
import logging
import os.path
import shutil
import ssl
import sys
import tempfile
import warnings
from test import (
LONG_TIMEOUT,
SHORT_TIMEOUT,
TARPIT_HOST,
notOpenSSL098,
notSecureTransport,
requires_network,
requires_ssl_context_keyfile_password,
resolvesL... | [x[0][1] for x in calls] | modified | 8617141dfc4f4848c5766d34097220537882e8e9f886afb14ace52db56646e22 | assert|test_unverified_ssl|import datetime import json import logging import os.path import shutil import ssl import sys import tempfile import warnings from test import ( LONG_TIMEOUT, SHORT_TIMEOUT, TARPIT_HOST, notOpenSSL098, notSecureTransport, requires_network, requires_ssl_context_keyfile_password, resolvesLocalh... | [x[0][1] for x in calls] | 332 | 16 |
urllib3/urllib3 | train | 434 | 4cf9a72161e304c7ce35215d6b0a5cfd03d18b1a | train | test/with_dummyserver/test_proxy_poolmanager.py | train | urllib3/urllib3:test/with_dummyserver/test_proxy_poolmanager.py | 368 | 12 | assert | test_https_headers_forwarding_for_https | import json
import os.path
import shutil
import socket
import tempfile
from test import LONG_TIMEOUT, SHORT_TIMEOUT, onlySecureTransport, withPyOpenSSL
import pytest
import trustme
from dummyserver.server import DEFAULT_CA, HAS_IPV6, get_unreachable_address
from dummyserver.testcase import HTTPDummyProxyTestCase, IPv... | "bar" | modified | 217e39eb52d1c8b95ce16e4564fb8dd21af40bd1a12ca767a5fe82484a0f4578 | assert|test_https_headers_forwarding_for_https|import json import os.path import shutil import socket import tempfile from test import LONG_TIMEOUT, SHORT_TIMEOUT, onlySecureTransport, withPyOpenSSL import pytest import trustme from dummyserver.server import DEFAULT_CA, HAS_IPV6, get_unreachable_address from dummyserve... | "bar" | 369 | 12 |
urllib3/urllib3 | train | 435 | 841a7271750b2694589f292e3f395541319a2a44 | train | test/contrib/test_pyopenssl.py | train | urllib3/urllib3:test/contrib/test_pyopenssl.py | 66 | 8 | assert | test_dnsname_to_stdlib_simple | import os
from unittest import mock
import pytest
try:
from cryptography import x509
from OpenSSL.crypto import FILETYPE_PEM, load_certificate
from urllib3.contrib.pyopenssl import _dnsname_to_stdlib, get_subj_alt_name
except ImportError:
pass
def setup_module():
try:
from urllib3.contr... | expected_result | modified | 95e691f9dbcbc5d631c79d2913a69ca71449310a19a69f82c5298223c3a20042 | assert|test_dnsname_to_stdlib_simple|import os from unittest import mock import pytest try: from cryptography import x509 from OpenSSL.crypto import FILETYPE_PEM, load_certificate from urllib3.contrib.pyopenssl import _dnsname_to_stdlib, get_subj_alt_name except ImportError: pass def setup_module(): try: from urllib3.c... | expected_result | 63 | 8 |
urllib3/urllib3 | train | 435 | 841a7271750b2694589f292e3f395541319a2a44 | train | test/contrib/test_pyopenssl.py | train | urllib3/urllib3:test/contrib/test_pyopenssl.py | 75 | 8 | assert | test_dnsname_to_stdlib_leading_period | import os
from unittest import mock
import pytest
try:
from cryptography import x509
from OpenSSL.crypto import FILETYPE_PEM, load_certificate
from urllib3.contrib.pyopenssl import _dnsname_to_stdlib, get_subj_alt_name
except ImportError:
pass
def setup_module():
try:
from urllib3.contr... | expected_result | modified | feb8534bc0ff53a9db884befef679bc0316de7c21042d08acf3bcde6a1eac72f | assert|test_dnsname_to_stdlib_leading_period|import os from unittest import mock import pytest try: from cryptography import x509 from OpenSSL.crypto import FILETYPE_PEM, load_certificate from urllib3.contrib.pyopenssl import _dnsname_to_stdlib, get_subj_alt_name except ImportError: pass def setup_module(): try: from u... | expected_result | 72 | 8 |
urllib3/urllib3 | train | 435 | 841a7271750b2694589f292e3f395541319a2a44 | train | test/contrib/test_pyopenssl.py | train | urllib3/urllib3:test/contrib/test_pyopenssl.py | 85 | 8 | assert | test_dnsname_to_stdlib_leading_splat | import os
from unittest import mock
import pytest
try:
from cryptography import x509
from OpenSSL.crypto import FILETYPE_PEM, load_certificate
from urllib3.contrib.pyopenssl import _dnsname_to_stdlib, get_subj_alt_name
except ImportError:
pass
def setup_module():
try:
from urllib3.contr... | expected_result | added | 32a37421a1a91b23b6add13e7c8125092c56d8ed31f8cd07d05a91e7ec80c501 | assert|test_dnsname_to_stdlib_leading_splat|import os from unittest import mock import pytest try: from cryptography import x509 from OpenSSL.crypto import FILETYPE_PEM, load_certificate from urllib3.contrib.pyopenssl import _dnsname_to_stdlib, get_subj_alt_name except ImportError: pass def setup_module(): try: from ur... | null | null | null |
urllib3/urllib3 | train | 435 | 841a7271750b2694589f292e3f395541319a2a44 | train | test/contrib/test_pyopenssl.py | train | urllib3/urllib3:test/contrib/test_pyopenssl.py | 100 | 8 | assert | test_get_subj_alt_name | import os
from unittest import mock
import pytest
try:
from cryptography import x509
from OpenSSL.crypto import FILETYPE_PEM, load_certificate
from urllib3.contrib.pyopenssl import _dnsname_to_stdlib, get_subj_alt_name
except ImportError:
pass
def setup_module():
try:
from urllib3.contr... | isinstance(mock_warning.call_args[0][1], x509.DuplicateExtension) | added | 951b660540c30cbe92c131ce8071ea16c71be4b8e2c5e2cedfdb2a4b40318870 | assert|test_get_subj_alt_name|import os from unittest import mock import pytest try: from cryptography import x509 from OpenSSL.crypto import FILETYPE_PEM, load_certificate from urllib3.contrib.pyopenssl import _dnsname_to_stdlib, get_subj_alt_name except ImportError: pass def setup_module(): try: from urllib3.contrib.... | null | null | null |
urllib3/urllib3 | train | 435 | 841a7271750b2694589f292e3f395541319a2a44 | train | test/test_ssl.py | train | urllib3/urllib3:test/test_ssl.py | 29 | 8 | assert | test_is_ipaddress_true | from unittest import mock
import pytest
from urllib3.exceptions import SNIMissingWarning
from urllib3.util import ssl_
class TestSSL:
@pytest.mark.parametrize(
"addr",
[
# IPv6
"::1",
"::",
"FE80::8939:7684:D84b:a5A4%251",
# IPv4
... | ssl_.is_ipaddress(addr) | modified | ee2f17d3baef9310a574655feb155f9b528a491720be64e4e1a1da5d21e25c35 | assert|test_is_ipaddress_true|from unittest import mock import pytest from urllib3.exceptions import SNIMissingWarning from urllib3.util import ssl_ class TestSSL: @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 "FE... | ssl_.is_ipaddress(addr) | 28 | 4 |
urllib3/urllib3 | train | 435 | 841a7271750b2694589f292e3f395541319a2a44 | train | test/test_ssl.py | train | urllib3/urllib3:test/test_ssl.py | 41 | 8 | assert | test_is_ipaddress_false | from unittest import mock
import pytest
from urllib3.exceptions import SNIMissingWarning
from urllib3.util import ssl_
class TestSSL:
@pytest.mark.parametrize(
"addr",
[
# IPv6
"::1",
"::",
"FE80::8939:7684:D84b:a5A4%251",
# IPv4
... | not ssl_.is_ipaddress(addr) | modified | 176f46ac931ba2337531db31ab790f1446557dbb3d776385634747592b9afe3b | assert|test_is_ipaddress_false|from unittest import mock import pytest from urllib3.exceptions import SNIMissingWarning from urllib3.util import ssl_ class TestSSL: @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 "F... | not ssl_.is_ipaddress(addr) | 41 | 4 |
urllib3/urllib3 | train | 435 | 841a7271750b2694589f292e3f395541319a2a44 | train | test/test_ssl.py | train | urllib3/urllib3:test/test_ssl.py | 118 | 8 | assert | test_create_urllib3_context_set_ciphers | from unittest import mock
import pytest
from urllib3.exceptions import SNIMissingWarning
from urllib3.util import ssl_
class TestSSL:
@pytest.mark.parametrize(
"addr",
[
# IPv6
"::1",
"::",
"FE80::8939:7684:D84b:a5A4%251",
# IPv4
... | context | modified | e48277c551b6e9726e374e4c6f7899c8275b623bb317e1e033c705c240aec3cc | assert|test_create_urllib3_context_set_ciphers|from unittest import mock import pytest from urllib3.exceptions import SNIMissingWarning from urllib3.util import ssl_ class TestSSL: @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", # IPv... | 1 | 115 | 4 |
urllib3/urllib3 | train | 435 | 841a7271750b2694589f292e3f395541319a2a44 | train | test/test_ssl.py | train | urllib3/urllib3:test/test_ssl.py | 172 | 8 | assert | test_create_urllib3_context_pha | from unittest import mock
import pytest
from urllib3.exceptions import SNIMissingWarning
from urllib3.util import ssl_
class TestSSL:
@pytest.mark.parametrize(
"addr",
[
# IPv6
"::1",
"::",
"FE80::8939:7684:D84b:a5A4%251",
# IPv4
... | expected_pha | added | d2526df1bdfd79a9eda9962f83671b8f6b2c0102c9f9edab2f64dc8eef450ff0 | assert|test_create_urllib3_context_pha|from unittest import mock import pytest from urllib3.exceptions import SNIMissingWarning from urllib3.util import ssl_ class TestSSL: @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/ Zon... | null | null | null |
urllib3/urllib3 | train | 436 | 39e9548b9940505b8509ef673af22f994714cb14 | train | test/contrib/test_socks.py | train | urllib3/urllib3:test/contrib/test_socks.py | 269 | 12 | assert | test_local_dns | import socket
import threading
from socket import getaddrinfo as real_getaddrinfo
from test import SHORT_TIMEOUT
import pytest
import socks as py_socks
from dummyserver.server import DEFAULT_CA, DEFAULT_CERTS
from dummyserver.testcase import IPV4SocketDummyServerTestCase
from urllib3.contrib import socks
from urllib3... | ["127.0.0.1", "::1"] | modified | e4bbf88772137a4a8d37a8c970d1716c29c1c5a13d8dd05882e7b95e9562a4bc | assert|test_local_dns|import socket import threading from socket import getaddrinfo as real_getaddrinfo from test import SHORT_TIMEOUT import pytest import socks as py_socks from dummyserver.server import DEFAULT_CA, DEFAULT_CERTS from dummyserver.testcase import IPV4SocketDummyServerTestCase from urllib3.contrib impor... | ["127.0.0.1", "::1"] | 271 | 12 |
urllib3/urllib3 | train | 436 | 39e9548b9940505b8509ef673af22f994714cb14 | train | test/contrib/test_socks.py | train | urllib3/urllib3:test/contrib/test_socks.py | 338 | 17 | pytest.raises | test_connection_timeouts | import socket
import threading
from socket import getaddrinfo as real_getaddrinfo
from test import SHORT_TIMEOUT
import pytest
import socks as py_socks
from dummyserver.server import DEFAULT_CA, DEFAULT_CERTS
from dummyserver.testcase import IPV4SocketDummyServerTestCase
from urllib3.contrib import socks
from urllib3... | ConnectTimeoutError) | modified | 0f564b702ed8950c36431e0e266e149feb04b21c69af7b2e7414b7c5a9e6d6b1 | pytest.raises|test_connection_timeouts|import socket import threading from socket import getaddrinfo as real_getaddrinfo from test import SHORT_TIMEOUT import pytest import socks as py_socks from dummyserver.server import DEFAULT_CA, DEFAULT_CERTS from dummyserver.testcase import IPV4SocketDummyServerTestCase from urll... | ConnectTimeoutError) | 340 | 17 |
urllib3/urllib3 | train | 436 | 39e9548b9940505b8509ef673af22f994714cb14 | train | test/contrib/test_socks.py | train | urllib3/urllib3:test/contrib/test_socks.py | 428 | 12 | assert | test_socks_with_auth_in_url | import socket
import threading
from socket import getaddrinfo as real_getaddrinfo
from test import SHORT_TIMEOUT
import pytest
import socks as py_socks
from dummyserver.server import DEFAULT_CA, DEFAULT_CERTS
from dummyserver.testcase import IPV4SocketDummyServerTestCase
from urllib3.contrib import socks
from urllib3... | "16.17.18.19" | modified | a2c3ff1a283d802712e78460474f0d3dcaa3d625420506c874ef420fa7d4ecae | assert|test_socks_with_auth_in_url|import socket import threading from socket import getaddrinfo as real_getaddrinfo from test import SHORT_TIMEOUT import pytest import socks as py_socks from dummyserver.server import DEFAULT_CA, DEFAULT_CERTS from dummyserver.testcase import IPV4SocketDummyServerTestCase from urllib3.... | "16.17.18.19" | 430 | 12 |
urllib3/urllib3 | train | 436 | 39e9548b9940505b8509ef673af22f994714cb14 | train | test/contrib/test_socks.py | train | urllib3/urllib3:test/contrib/test_socks.py | 593 | 12 | assert | test_correct_header_line | import socket
import threading
from socket import getaddrinfo as real_getaddrinfo
from test import SHORT_TIMEOUT
import pytest
import socks as py_socks
from dummyserver.server import DEFAULT_CA, DEFAULT_CERTS
from dummyserver.testcase import IPV4SocketDummyServerTestCase
from urllib3.contrib import socks
from urllib3... | b"example.com" | modified | c5fc16b77547d7223d0db136bcc73a449e50aa464ebdcfcedcd0f0f2c1a55e40 | assert|test_correct_header_line|import socket import threading from socket import getaddrinfo as real_getaddrinfo from test import SHORT_TIMEOUT import pytest import socks as py_socks from dummyserver.server import DEFAULT_CA, DEFAULT_CERTS from dummyserver.testcase import IPV4SocketDummyServerTestCase from urllib3.con... | b"example.com" | 595 | 12 |
urllib3/urllib3 | train | 437 | 7d55357d1ed68984043ac8239c7b573ae370844c | train | test/with_dummyserver/test_poolmanager.py | train | urllib3/urllib3:test/with_dummyserver/test_poolmanager.py | 43 | 12 | assert | test_redirect | import json
from test import LONG_TIMEOUT
import pytest
from dummyserver.server import HAS_IPV6
from dummyserver.testcase import HTTPDummyServerTestCase, IPv6HTTPDummyServerTestCase
from urllib3 import request
from urllib3.connectionpool import port_by_scheme
from urllib3.exceptions import MaxRetryError, URLSchemeUnk... | b"Dummy server!" | modified | adb6777888fb772892caf66407f74b7f458386dbe86c2b9a657433dbadd3f2ca | assert|test_redirect|import json from test import LONG_TIMEOUT import pytest from dummyserver.server import HAS_IPV6 from dummyserver.testcase import HTTPDummyServerTestCase, IPv6HTTPDummyServerTestCase from urllib3 import request from urllib3.connectionpool import port_by_scheme from urllib3.exceptions import MaxRetry... | b"Dummy server!" | 42 | 12 |
urllib3/urllib3 | train | 437 | 7d55357d1ed68984043ac8239c7b573ae370844c | train | test/with_dummyserver/test_poolmanager.py | train | urllib3/urllib3:test/with_dummyserver/test_poolmanager.py | 81 | 12 | assert | test_redirect_to_relative_url | import json
from test import LONG_TIMEOUT
import pytest
from dummyserver.server import HAS_IPV6
from dummyserver.testcase import HTTPDummyServerTestCase, IPv6HTTPDummyServerTestCase
from urllib3 import request
from urllib3.connectionpool import port_by_scheme
from urllib3.exceptions import MaxRetryError, URLSchemeUnk... | b"Dummy server!" | modified | 43a0d589c29b8390cfccce9deb58ae927484eb7786666d902a39dce76c3c2627 | assert|test_redirect_to_relative_url|import json from test import LONG_TIMEOUT import pytest from dummyserver.server import HAS_IPV6 from dummyserver.testcase import HTTPDummyServerTestCase, IPv6HTTPDummyServerTestCase from urllib3 import request from urllib3.connectionpool import port_by_scheme from urllib3.exceptions... | b"Dummy server!" | 80 | 12 |
urllib3/urllib3 | train | 437 | 7d55357d1ed68984043ac8239c7b573ae370844c | train | test/with_dummyserver/test_poolmanager.py | train | urllib3/urllib3:test/with_dummyserver/test_poolmanager.py | 178 | 12 | assert | test_redirect_cross_host_no_remove_headers | import json
from test import LONG_TIMEOUT
import pytest
from dummyserver.server import HAS_IPV6
from dummyserver.testcase import HTTPDummyServerTestCase, IPv6HTTPDummyServerTestCase
from urllib3 import request
from urllib3.connectionpool import port_by_scheme
from urllib3.exceptions import MaxRetryError, URLSchemeUnk... | "foo" | modified | 5267fe3ad03deb0e691ca2e41a68d18c097761340ce667ff056788467db81e6f | assert|test_redirect_cross_host_no_remove_headers|import json from test import LONG_TIMEOUT import pytest from dummyserver.server import HAS_IPV6 from dummyserver.testcase import HTTPDummyServerTestCase, IPv6HTTPDummyServerTestCase from urllib3 import request from urllib3.connectionpool import port_by_scheme from urlli... | "foo" | 177 | 12 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.