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 | 513 | 87a292aafa959059db885b7eed87eb7c7d8ebeb7 | train | test/test_poolmanager.py | train | urllib3/urllib3:test/test_poolmanager.py | 361 | 8 | assert | test_override_pool_kwargs_host | import socket
from test import resolvesLocalhostFQDN
from typing import Optional
from unittest import mock
from unittest.mock import patch
import pytest
from urllib3 import connection_from_url
from urllib3.connectionpool import HTTPSConnectionPool
from urllib3.exceptions import ClosedPoolError, LocationValueError
fro... | override_pool.block | added | f644db22e0760d1473d4a2c83d9ef4c9956a9e1f108db52308296bc08be4f335 | assert|test_override_pool_kwargs_host|import socket from test import resolvesLocalhostFQDN from typing import Optional from unittest import mock from unittest.mock import patch import pytest from urllib3 import connection_from_url from urllib3.connectionpool import HTTPSConnectionPool from urllib3.exceptions import Clo... | null | null | null |
urllib3/urllib3 | train | 514 | b87d61a10eac3364128ce45d6560c7f25e1c2b0d | train | test/with_dummyserver/test_https.py | train | urllib3/urllib3:test/with_dummyserver/test_https.py | 256 | 12 | assert | test_verified_with_context | import datetime
import json
import logging
import os.path
import shutil
import ssl
import sys
import tempfile
import warnings
from pathlib import Path
from test import (
LONG_TIMEOUT,
SHORT_TIMEOUT,
TARPIT_HOST,
notSecureTransport,
requires_network,
requires_ssl_context_keyfile_password,
res... | VerifiedHTTPSConnection | modified | d1cffc8406b60d2f9fbf4e2dce72727aad0ffd89d5ce80ebccb8bb6c56fd2923 | assert|test_verified_with_context|import datetime import json import logging import os.path import shutil import ssl import sys import tempfile import warnings from pathlib import Path from test import ( LONG_TIMEOUT, SHORT_TIMEOUT, TARPIT_HOST, notSecureTransport, requires_network, requires_ssl_context_keyfile_passwor... | 200 | 256 | 16 |
urllib3/urllib3 | train | 514 | b87d61a10eac3364128ce45d6560c7f25e1c2b0d | train | test/with_dummyserver/test_https.py | train | urllib3/urllib3:test/with_dummyserver/test_https.py | 407 | 16 | assert | test_ssl_unverified_with_ca_certs | import datetime
import json
import logging
import os.path
import shutil
import ssl
import sys
import tempfile
import warnings
from pathlib import Path
from test import (
LONG_TIMEOUT,
SHORT_TIMEOUT,
TARPIT_HOST,
notSecureTransport,
requires_network,
requires_ssl_context_keyfile_password,
res... | InsecureRequestWarning | added | 32309f42cc9e67010163a4c2aebcd96328b1985ac12dacf250c43bb580336a1c | assert|test_ssl_unverified_with_ca_certs|import datetime import json import logging import os.path import shutil import ssl import sys import tempfile import warnings from pathlib import Path from test import ( LONG_TIMEOUT, SHORT_TIMEOUT, TARPIT_HOST, notSecureTransport, requires_network, requires_ssl_context_keyfile_... | null | null | null |
urllib3/urllib3 | train | 514 | b87d61a10eac3364128ce45d6560c7f25e1c2b0d | train | test/with_dummyserver/test_https.py | train | urllib3/urllib3:test/with_dummyserver/test_https.py | 512 | 12 | assert | test_assert_invalid_fingerprint | import datetime
import json
import logging
import os.path
import shutil
import ssl
import sys
import tempfile
import warnings
from pathlib import Path
from test import (
LONG_TIMEOUT,
SHORT_TIMEOUT,
TARPIT_HOST,
notSecureTransport,
requires_network,
requires_ssl_context_keyfile_password,
res... | f'Fingerprints did not match. Expected "{expected}", got "{got}"' | added | cb1f5590ecc3c364195572ace8ab086dc20d715fdd49ff65748e13804b19fa50 | assert|test_assert_invalid_fingerprint|import datetime import json import logging import os.path import shutil import ssl import sys import tempfile import warnings from pathlib import Path from test import ( LONG_TIMEOUT, SHORT_TIMEOUT, TARPIT_HOST, notSecureTransport, requires_network, requires_ssl_context_keyfile_pa... | null | null | null |
urllib3/urllib3 | train | 514 | b87d61a10eac3364128ce45d6560c7f25e1c2b0d | train | test/with_dummyserver/test_https.py | train | urllib3/urllib3:test/with_dummyserver/test_https.py | 972 | 17 | pytest.raises | test_common_name_without_san_fails | import datetime
import json
import logging
import os.path
import shutil
import ssl
import sys
import tempfile
import warnings
from pathlib import Path
from test import (
LONG_TIMEOUT,
SHORT_TIMEOUT,
TARPIT_HOST,
notSecureTransport,
requires_network,
requires_ssl_context_keyfile_password,
res... | MaxRetryError, match="no appropriate subjectAltName") | added | 44f9606d327e6af6b092fb454cedd9c1fc70dffdd18c4cb1d071ff7825ec08bc | pytest.raises|test_common_name_without_san_fails|import datetime import json import logging import os.path import shutil import ssl import sys import tempfile import warnings from pathlib import Path from test import ( LONG_TIMEOUT, SHORT_TIMEOUT, TARPIT_HOST, notSecureTransport, requires_network, requires_ssl_context_... | null | null | null |
urllib3/urllib3 | train | 515 | 196809734e181ac8c82d37abcff99b81c85fd455 | train | test/with_dummyserver/test_integration.py | train | urllib3/urllib3:test/with_dummyserver/test_integration.py | 13 | 8 | assert | test_requests_integration | import pytest
import requests
from dummyserver.server import DEFAULT_CA
from dummyserver.testcase import HTTPDummyServerTestCase, HTTPSDummyServerTestCase
class TestHTTPIntegration(HTTPDummyServerTestCase):
def test_requests_integration(self) -> None:
with pytest.warns(DeprecationWarning) as records:
... | response.status_code | modified | d05068055fb04a0a0045cc9256a1b9d9cf452404def3cc790cbf904ae1d7d7ed | assert|test_requests_integration|import pytest import requests from dummyserver.server import DEFAULT_CA from dummyserver.testcase import HTTPDummyServerTestCase, HTTPSDummyServerTestCase class TestHTTPIntegration(HTTPDummyServerTestCase): def test_requests_integration(self) -> None: with pytest.warns(DeprecationWarnin... | response.status_code | 13 | 8 |
urllib3/urllib3 | train | 515 | 196809734e181ac8c82d37abcff99b81c85fd455 | train | test/with_dummyserver/test_integration.py | train | urllib3/urllib3:test/with_dummyserver/test_integration.py | 18 | 8 | assert | test_requests_integration | import pytest
import requests
from dummyserver.server import DEFAULT_CA
from dummyserver.testcase import HTTPDummyServerTestCase, HTTPSDummyServerTestCase
class TestHTTPIntegration(HTTPDummyServerTestCase):
def test_requests_integration(self) -> None:
with pytest.warns(DeprecationWarning) as records:
... | any( isinstance(record.message, Warning) and record.message.args[0] == msg for record in records ) | modified | 90a34881f011702d34f6999dbad0aa2376d80045466debe96184e7248fdb0e09 | assert|test_requests_integration|import pytest import requests from dummyserver.server import DEFAULT_CA from dummyserver.testcase import HTTPDummyServerTestCase, HTTPSDummyServerTestCase class TestHTTPIntegration(HTTPDummyServerTestCase): def test_requests_integration(self) -> None: with pytest.warns(DeprecationWarnin... | any(record.message.args[0] == msg for record in records) | 18 | 8 |
urllib3/urllib3 | train | 515 | 196809734e181ac8c82d37abcff99b81c85fd455 | train | test/with_dummyserver/test_integration.py | train | urllib3/urllib3:test/with_dummyserver/test_integration.py | 31 | 8 | assert | test_requests_integration | import pytest
import requests
from dummyserver.server import DEFAULT_CA
from dummyserver.testcase import HTTPDummyServerTestCase, HTTPSDummyServerTestCase
class TestHTTPIntegration(HTTPDummyServerTestCase):
def test_requests_integration(self) -> None:
with pytest.warns(DeprecationWarning) as records:
... | response.status_code | modified | c09bb6542bb0bc378c7f2c7dcbf1d90c984498e62f5b7fc7e9c55f277ea6f2e2 | assert|test_requests_integration|import pytest import requests from dummyserver.server import DEFAULT_CA from dummyserver.testcase import HTTPDummyServerTestCase, HTTPSDummyServerTestCase class TestHTTPIntegration(HTTPDummyServerTestCase): def test_requests_integration(self) -> None: with pytest.warns(DeprecationWarnin... | response.status_code | 28 | 8 |
urllib3/urllib3 | train | 515 | 196809734e181ac8c82d37abcff99b81c85fd455 | train | test/with_dummyserver/test_integration.py | train | urllib3/urllib3:test/with_dummyserver/test_integration.py | 36 | 8 | assert | test_requests_integration | import pytest
import requests
from dummyserver.server import DEFAULT_CA
from dummyserver.testcase import HTTPDummyServerTestCase, HTTPSDummyServerTestCase
class TestHTTPIntegration(HTTPDummyServerTestCase):
def test_requests_integration(self) -> None:
with pytest.warns(DeprecationWarning) as records:
... | any( isinstance(record.message, Warning) and record.message.args[0] == msg for record in records ) | modified | 818803b6c4448b3064c3fb220f8dcd3f009e8936afdf0b232f8bbbbc67fe2d92 | assert|test_requests_integration|import pytest import requests from dummyserver.server import DEFAULT_CA from dummyserver.testcase import HTTPDummyServerTestCase, HTTPSDummyServerTestCase class TestHTTPIntegration(HTTPDummyServerTestCase): def test_requests_integration(self) -> None: with pytest.warns(DeprecationWarnin... | any(record.message.args[0] == msg for record in records) | 33 | 8 |
urllib3/urllib3 | train | 516 | 8b2efe0b79459499e0d0190b328ee50e5b971301 | train | test/with_dummyserver/test_https.py | train | urllib3/urllib3:test/with_dummyserver/test_https.py | 308 | 17 | pytest.raises | test_invalid_common_name | import datetime
import json
import logging
import os.path
import shutil
import ssl
import sys
import tempfile
import warnings
from pathlib import Path
from test import (
LONG_TIMEOUT,
SHORT_TIMEOUT,
TARPIT_HOST,
notSecureTransport,
requires_network,
requires_ssl_context_keyfile_password,
res... | MaxRetryError) | modified | 5fd03e26f3e2a0e29f61235cedcf305f69dc95a7772da73c782888e336db6a09 | pytest.raises|test_invalid_common_name|import datetime import json import logging import os.path import shutil import ssl import sys import tempfile import warnings from pathlib import Path from test import ( LONG_TIMEOUT, SHORT_TIMEOUT, TARPIT_HOST, notSecureTransport, requires_network, requires_ssl_context_keyfile_pa... | MaxRetryError) | 309 | 17 |
urllib3/urllib3 | train | 516 | 8b2efe0b79459499e0d0190b328ee50e5b971301 | train | test/with_dummyserver/test_https.py | train | urllib3/urllib3:test/with_dummyserver/test_https.py | 533 | 17 | pytest.raises | test_verify_none_and_bad_fingerprint | import datetime
import json
import logging
import os.path
import shutil
import ssl
import sys
import tempfile
import warnings
from pathlib import Path
from test import (
LONG_TIMEOUT,
SHORT_TIMEOUT,
TARPIT_HOST,
notSecureTransport,
requires_network,
requires_ssl_context_keyfile_password,
res... | MaxRetryError) | modified | 0106c66001ed406d704fec4913bbc22a136b40301c306d6ae7538a27803b585e | pytest.raises|test_verify_none_and_bad_fingerprint|import datetime import json import logging import os.path import shutil import ssl import sys import tempfile import warnings from pathlib import Path from test import ( LONG_TIMEOUT, SHORT_TIMEOUT, TARPIT_HOST, notSecureTransport, requires_network, requires_ssl_contex... | MaxRetryError) | 534 | 17 |
urllib3/urllib3 | train | 516 | 8b2efe0b79459499e0d0190b328ee50e5b971301 | train | test/with_dummyserver/test_https.py | train | urllib3/urllib3:test/with_dummyserver/test_https.py | 786 | 8 | assert | test_ssl_version_is_deprecated | import datetime
import json
import logging
import os.path
import shutil
import ssl
import sys
import tempfile
import warnings
from pathlib import Path
from test import (
LONG_TIMEOUT,
SHORT_TIMEOUT,
TARPIT_HOST,
notSecureTransport,
requires_network,
requires_ssl_context_keyfile_password,
res... | any( str(x.message) == ( "'ssl_version' option is deprecated and will be removed in " "a future release of urllib3 2.x. Instead use 'ssl_minimum_version'" ) for x in w ) | modified | 3a25b61f302228ea1dc52cf56f8d068a80eb4c3d7249cb89faf3e7afe5ebf3ef | assert|test_ssl_version_is_deprecated|import datetime import json import logging import os.path import shutil import ssl import sys import tempfile import warnings from pathlib import Path from test import ( LONG_TIMEOUT, SHORT_TIMEOUT, TARPIT_HOST, notSecureTransport, requires_network, requires_ssl_context_keyfile_pas... | any( str(x.message) == ( "'ssl_version' option is deprecated and will be removed in " "a future release of urllib3 2.x. Instead use 'ssl_minimum_version'" ) for x in w ) | 787 | 8 |
urllib3/urllib3 | train | 516 | 8b2efe0b79459499e0d0190b328ee50e5b971301 | train | test/with_dummyserver/test_https.py | train | urllib3/urllib3:test/with_dummyserver/test_https.py | 931 | 8 | assert | test_default_ssl_context_ssl_min_max_versions | import datetime
import json
import logging
import os.path
import shutil
import ssl
import sys
import tempfile
import warnings
from pathlib import Path
from test import (
LONG_TIMEOUT,
SHORT_TIMEOUT,
TARPIT_HOST,
notSecureTransport,
requires_network,
requires_ssl_context_keyfile_password,
res... | ssl.TLSVersion.MAXIMUM_SUPPORTED | modified | 2c7701d4dad0b2a49cf7f7f8ce13b7218c58b1d700ab98e291c74a3664f8638f | assert|test_default_ssl_context_ssl_min_max_versions|import datetime import json import logging import os.path import shutil import ssl import sys import tempfile import warnings from pathlib import Path from test import ( LONG_TIMEOUT, SHORT_TIMEOUT, TARPIT_HOST, notSecureTransport, requires_network, requires_ssl_cont... | ssl.TLSVersion.MAXIMUM_SUPPORTED | 932 | 8 |
urllib3/urllib3 | train | 517 | 82ff145c7b6637f9a52a99dea1166779771c6941 | train | test/test_no_ssl.py | train | urllib3/urllib3:test/test_no_ssl.py | 34 | 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
from test import ImportBlocker, ModuleStash
import pytest
ssl_blocker = ImportBlocker("ssl", "_ssl")
module_stash = M... | ImportError) | modified | a44a4a4b116eacd71a7923e88eb619b082068c9d33370a52f9c812717c9aeab0 | 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 from test import ImportBlocker, ModuleStash import pytest ssl_blocker = ImportBlocke... | ImportError) | 34 | 13 |
urllib3/urllib3 | train | 519 | 7c9ca88b7dd5fe6b0e9fac52f72202edd74bd8b2 | train | test/test_connection.py | test | urllib3/urllib3:test/test_connection.py | 133 | 12 | assert_* | test_match_hostname_ip_address_ipv6 | import datetime
import socket
from unittest import mock
import pytest
from urllib3.connection import ( # type: ignore[attr-defined]
RECENT_DATE,
CertificateError,
HTTPSConnection,
_match_hostname,
)
from urllib3.util.ssl_ import _TYPE_PEER_CERT_RET
from urllib3.util.ssl_match_hostname import (
Ce... | {"subjectAltName": (("IP Address", "1:2::2:1"),)}) | added | e6602fd31ceb9dc2201af808b9ca46893ef386082a0a6833d67d755ca457cc75 | assert_*|test_match_hostname_ip_address_ipv6|import datetime import socket from unittest import mock import pytest from urllib3.connection import ( # type: ignore[attr-defined] RECENT_DATE, CertificateError, HTTPSConnection, _match_hostname, ) from urllib3.util.ssl_ import _TYPE_PEER_CERT_RET from urllib3.util.ssl_matc... | null | null | null |
urllib3/urllib3 | train | 519 | 7c9ca88b7dd5fe6b0e9fac52f72202edd74bd8b2 | train | test/test_connection.py | test | urllib3/urllib3:test/test_connection.py | 138 | 12 | assert | test_match_hostname_ip_address_ipv6 | import datetime
import socket
from unittest import mock
import pytest
from urllib3.connection import ( # type: ignore[attr-defined]
RECENT_DATE,
CertificateError,
HTTPSConnection,
_match_hostname,
)
from urllib3.util.ssl_ import _TYPE_PEER_CERT_RET
from urllib3.util.ssl_match_hostname import (
Ce... | cert | added | df860a7e17936102f4e2555fdbdbd3f69daa3e1910557646175b33ac0e1f5644 | assert|test_match_hostname_ip_address_ipv6|import datetime import socket from unittest import mock import pytest from urllib3.connection import ( # type: ignore[attr-defined] RECENT_DATE, CertificateError, HTTPSConnection, _match_hostname, ) from urllib3.util.ssl_ import _TYPE_PEER_CERT_RET from urllib3.util.ssl_match_... | null | null | null |
urllib3/urllib3 | train | 519 | 7c9ca88b7dd5fe6b0e9fac52f72202edd74bd8b2 | train | test/test_connection.py | test | urllib3/urllib3:test/test_connection.py | 152 | 8 | assert | test_recent_date | import datetime
import socket
from unittest import mock
import pytest
from urllib3.connection import ( # type: ignore[attr-defined]
RECENT_DATE,
CertificateError,
HTTPSConnection,
_match_hostname,
)
from urllib3.util.ssl_ import _TYPE_PEER_CERT_RET
from urllib3.util.ssl_match_hostname import (
Ce... | (datetime.datetime.today() - two_years).date() | added | 9bc5bfe5e05006d9cc37a99f3d6179af626ce937317af6927b6277bf273af5f2 | assert|test_recent_date|import datetime import socket from unittest import mock import pytest from urllib3.connection import ( # type: ignore[attr-defined] RECENT_DATE, CertificateError, HTTPSConnection, _match_hostname, ) from urllib3.util.ssl_ import _TYPE_PEER_CERT_RET from urllib3.util.ssl_match_hostname import ( C... | null | null | null |
urllib3/urllib3 | train | 519 | 7c9ca88b7dd5fe6b0e9fac52f72202edd74bd8b2 | train | test/test_connection.py | test | urllib3/urllib3:test/test_connection.py | 156 | 8 | assert | test_HTTPSConnection_default_socket_options | import datetime
import socket
from unittest import mock
import pytest
from urllib3.connection import ( # type: ignore[attr-defined]
RECENT_DATE,
CertificateError,
HTTPSConnection,
_match_hostname,
)
from urllib3.util.ssl_ import _TYPE_PEER_CERT_RET
from urllib3.util.ssl_match_hostname import (
Ce... | [(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1)] | added | 7b480d0d0f431fd145b8c3b13e8b96d384f2f9f05d4a710756141b3c3dc7c969 | assert|test_HTTPSConnection_default_socket_options|import datetime import socket from unittest import mock import pytest from urllib3.connection import ( # type: ignore[attr-defined] RECENT_DATE, CertificateError, HTTPSConnection, _match_hostname, ) from urllib3.util.ssl_ import _TYPE_PEER_CERT_RET from urllib3.util.ss... | null | null | null |
urllib3/urllib3 | train | 520 | c5bc7163022c0ac2e765cdb7309937a53e32d368 | train | test/with_dummyserver/test_connectionpool.py | train | urllib3/urllib3:test/with_dummyserver/test_connectionpool.py | 699 | 12 | assert | test_percent_encode_invalid_target_chars | import io
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.testcase imp... | b"[('k', '\\n \\n'), ('q', '\\r')]" | modified | 1264324383212b33d682781a4c3d68231638ddc9e6e2f40d4b88286033dc165e | assert|test_percent_encode_invalid_target_chars|import io 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_DN... | b"[('k', '\\n \\n'), ('q', '\\r')]" | 700 | 12 |
urllib3/urllib3 | train | 520 | c5bc7163022c0ac2e765cdb7309937a53e32d368 | train | test/with_dummyserver/test_connectionpool.py | train | urllib3/urllib3:test/with_dummyserver/test_connectionpool.py | 821 | 12 | assert | test_default_user_agent_header | import io
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.testcase imp... | _get_default_user_agent() | modified | f7ffb1fe79c38bfe4a23d3dc7a39ec6243a65d6573e602e8e7f34fd77aa7c2ab | assert|test_default_user_agent_header|import io 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, NoIPv6W... | _get_default_user_agent() | 822 | 12 |
urllib3/urllib3 | train | 520 | c5bc7163022c0ac2e765cdb7309937a53e32d368 | train | test/with_dummyserver/test_https.py | train | urllib3/urllib3:test/with_dummyserver/test_https.py | 378 | 16 | assert | test_unverified_ssl | import datetime
import logging
import os.path
import shutil
import ssl
import sys
import tempfile
import warnings
from pathlib import Path
from test import (
LONG_TIMEOUT,
SHORT_TIMEOUT,
TARPIT_HOST,
notSecureTransport,
requires_network,
requires_ssl_context_keyfile_password,
resolvesLocalho... | warn.called | modified | 51ac3932ca0e8a10e6253ca367a6be56ed1f43d578702cdbd5134f41a3fccc77 | assert|test_unverified_ssl|import datetime import logging import os.path import shutil import ssl import sys import tempfile import warnings from pathlib import Path from test import ( LONG_TIMEOUT, SHORT_TIMEOUT, TARPIT_HOST, notSecureTransport, requires_network, requires_ssl_context_keyfile_password, resolvesLocalhos... | warn.called | 379 | 16 |
urllib3/urllib3 | train | 520 | c5bc7163022c0ac2e765cdb7309937a53e32d368 | train | test/with_dummyserver/test_https.py | train | urllib3/urllib3:test/with_dummyserver/test_https.py | 929 | 8 | assert | test_default_ssl_context_ssl_min_max_versions | import datetime
import logging
import os.path
import shutil
import ssl
import sys
import tempfile
import warnings
from pathlib import Path
from test import (
LONG_TIMEOUT,
SHORT_TIMEOUT,
TARPIT_HOST,
notSecureTransport,
requires_network,
requires_ssl_context_keyfile_password,
resolvesLocalho... | ssl.TLSVersion.TLSv1_2 | modified | 97c8844dfbb3a4d7d09bed404d826ce5671921f367191e9a37095397113d76f8 | assert|test_default_ssl_context_ssl_min_max_versions|import datetime import logging import os.path import shutil import ssl import sys import tempfile import warnings from pathlib import Path from test import ( LONG_TIMEOUT, SHORT_TIMEOUT, TARPIT_HOST, notSecureTransport, requires_network, requires_ssl_context_keyfile_... | ssl.TLSVersion.TLSv1_2 | 930 | 8 |
urllib3/urllib3 | train | 520 | c5bc7163022c0ac2e765cdb7309937a53e32d368 | train | test/with_dummyserver/test_poolmanager.py | train | urllib3/urllib3:test/with_dummyserver/test_poolmanager.py | 322 | 12 | assert | test_headers | import gzip
from test import LONG_TIMEOUT
from unittest import mock
import pytest
from dummyserver.server import HAS_IPV6
from dummyserver.testcase import HTTPDummyServerTestCase, IPv6HTTPDummyServerTestCase
from urllib3 import HTTPHeaderDict, HTTPResponse, request
from urllib3.connectionpool import port_by_scheme
fr... | "bar" | modified | 428f53b4e23b92a261d314e5a6b547dc2ac04c9cd5f991acc93966cd0e799427 | assert|test_headers|import gzip from test import LONG_TIMEOUT from unittest import mock import pytest from dummyserver.server import HAS_IPV6 from dummyserver.testcase import HTTPDummyServerTestCase, IPv6HTTPDummyServerTestCase from urllib3 import HTTPHeaderDict, HTTPResponse, request from urllib3.connectionpool import... | "bar" | 323 | 12 |
urllib3/urllib3 | train | 520 | c5bc7163022c0ac2e765cdb7309937a53e32d368 | train | test/with_dummyserver/test_poolmanager.py | train | urllib3/urllib3:test/with_dummyserver/test_poolmanager.py | 435 | 8 | assert | test_top_level_request_with_decode_content | import gzip
from test import LONG_TIMEOUT
from unittest import mock
import pytest
from dummyserver.server import HAS_IPV6
from dummyserver.testcase import HTTPDummyServerTestCase, IPv6HTTPDummyServerTestCase
from urllib3 import HTTPHeaderDict, HTTPResponse, request
from urllib3.connectionpool import port_by_scheme
fr... | b"hello, world!" | modified | 125082870900d1311612c1c60dd93aee4144728ccb9a652a17fb9918754fd306 | assert|test_top_level_request_with_decode_content|import gzip from test import LONG_TIMEOUT from unittest import mock import pytest from dummyserver.server import HAS_IPV6 from dummyserver.testcase import HTTPDummyServerTestCase, IPv6HTTPDummyServerTestCase from urllib3 import HTTPHeaderDict, HTTPResponse, request from... | b"hello, world!" | 436 | 8 |
urllib3/urllib3 | train | 520 | c5bc7163022c0ac2e765cdb7309937a53e32d368 | 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 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, IPv6HTTPDummyPr... | ProxySchemeUnsupported, match="isn't available on non-native SSLContext") | modified | 6cb4a3613a243e75243a46eaeaf197b185aab69ecc907ea49e062cac99161481 | pytest.raises|test_https_proxy_pyopenssl_not_supported|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.te... | ProxySchemeUnsupported, match="isn't available on non-native SSLContext") | 92 | 17 |
urllib3/urllib3 | train | 520 | c5bc7163022c0ac2e765cdb7309937a53e32d368 | 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 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, IPv6HTTPDummyPr... | ProxySchemeUnsupported, match="isn't available on non-native SSLContext") | modified | 671bbdfac8c208d25390dbda33b7d6681634333fe3814e3ef97d3ae54780cf6b | pytest.raises|test_https_proxy_securetransport_not_supported|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 dummyser... | ProxySchemeUnsupported, match="isn't available on non-native SSLContext") | 103 | 17 |
urllib3/urllib3 | train | 521 | 97c4c6a61d01f982937428f54ef10f81dfe256a2 | train | test/with_dummyserver/test_poolmanager.py | train | urllib3/urllib3:test/with_dummyserver/test_poolmanager.py | 44 | 12 | assert | test_redirect | import gzip
from test import LONG_TIMEOUT
from unittest import mock
import pytest
from dummyserver.server import HAS_IPV6
from dummyserver.testcase import HTTPDummyServerTestCase, IPv6HTTPDummyServerTestCase
from urllib3 import HTTPHeaderDict, HTTPResponse, request
from urllib3.connectionpool import port_by_scheme
fr... | b"Dummy server!" | modified | f0515cf67c6061fd961f390209ceff948bcbeb7644a6443d9b4dc3b58822525a | assert|test_redirect|import gzip from test import LONG_TIMEOUT from unittest import mock import pytest from dummyserver.server import HAS_IPV6 from dummyserver.testcase import HTTPDummyServerTestCase, IPv6HTTPDummyServerTestCase from urllib3 import HTTPHeaderDict, HTTPResponse, request from urllib3.connectionpool impor... | b"Dummy server!" | 44 | 12 |
urllib3/urllib3 | train | 521 | 97c4c6a61d01f982937428f54ef10f81dfe256a2 | train | test/with_dummyserver/test_poolmanager.py | train | urllib3/urllib3:test/with_dummyserver/test_poolmanager.py | 265 | 17 | pytest.raises | test_raise_on_status | import gzip
from test import LONG_TIMEOUT
from unittest import mock
import pytest
from dummyserver.server import HAS_IPV6
from dummyserver.testcase import HTTPDummyServerTestCase, IPv6HTTPDummyServerTestCase
from urllib3 import HTTPHeaderDict, HTTPResponse, request
from urllib3.connectionpool import port_by_scheme
fr... | MaxRetryError) | added | 9f14f3a78413d40245a851029983fb5c2b4fe09d54ab817cdcaf32f438a6757f | pytest.raises|test_raise_on_status|import gzip from test import LONG_TIMEOUT from unittest import mock import pytest from dummyserver.server import HAS_IPV6 from dummyserver.testcase import HTTPDummyServerTestCase, IPv6HTTPDummyServerTestCase from urllib3 import HTTPHeaderDict, HTTPResponse, request from urllib3.connec... | null | null | null |
urllib3/urllib3 | train | 521 | 97c4c6a61d01f982937428f54ef10f81dfe256a2 | train | test/with_dummyserver/test_poolmanager.py | train | urllib3/urllib3:test/with_dummyserver/test_poolmanager.py | 412 | 8 | assert | test_top_level_request | import gzip
from test import LONG_TIMEOUT
from unittest import mock
import pytest
from dummyserver.server import HAS_IPV6
from dummyserver.testcase import HTTPDummyServerTestCase, IPv6HTTPDummyServerTestCase
from urllib3 import HTTPHeaderDict, HTTPResponse, request
from urllib3.connectionpool import port_by_scheme
fr... | b"Dummy server!" | added | 2b03858e4325086799f225aa14747f5bba1357ccea0b74323d23e84220a01732 | assert|test_top_level_request|import gzip from test import LONG_TIMEOUT from unittest import mock import pytest from dummyserver.server import HAS_IPV6 from dummyserver.testcase import HTTPDummyServerTestCase, IPv6HTTPDummyServerTestCase from urllib3 import HTTPHeaderDict, HTTPResponse, request from urllib3.connectionp... | null | null | null |
urllib3/urllib3 | train | 521 | 97c4c6a61d01f982937428f54ef10f81dfe256a2 | train | test/with_dummyserver/test_poolmanager.py | train | urllib3/urllib3:test/with_dummyserver/test_poolmanager.py | 416 | 13 | pytest.raises | test_top_level_request_without_keyword_args | import gzip
from test import LONG_TIMEOUT
from unittest import mock
import pytest
from dummyserver.server import HAS_IPV6
from dummyserver.testcase import HTTPDummyServerTestCase, IPv6HTTPDummyServerTestCase
from urllib3 import HTTPHeaderDict, HTTPResponse, request
from urllib3.connectionpool import port_by_scheme
fr... | TypeError) | added | 2e2782aefaa5c62fa46199ffe48bc1f7554d03b1b878d3e639e9163e85d5e2ed | pytest.raises|test_top_level_request_without_keyword_args|import gzip from test import LONG_TIMEOUT from unittest import mock import pytest from dummyserver.server import HAS_IPV6 from dummyserver.testcase import HTTPDummyServerTestCase, IPv6HTTPDummyServerTestCase from urllib3 import HTTPHeaderDict, HTTPResponse, requ... | null | null | null |
urllib3/urllib3 | train | 522 | d68579d357f02b6d39b1cc93a9ee8f27a4e99793 | train | test/with_dummyserver/test_poolmanager.py | train | urllib3/urllib3:test/with_dummyserver/test_poolmanager.py | 515 | 8 | assert | test_request_with_json | import gzip
from test import LONG_TIMEOUT
from unittest import mock
import pytest
from dummyserver.server import HAS_IPV6
from dummyserver.testcase import HTTPDummyServerTestCase, IPv6HTTPDummyServerTestCase
from urllib3 import HTTPHeaderDict, HTTPResponse, request
from urllib3.connectionpool import port_by_scheme
fr... | body | modified | b377bc1b36b426c40405d472e268796ee84691d9cb20ec5b22ffa5bdacc870d2 | assert|test_request_with_json|import gzip from test import LONG_TIMEOUT from unittest import mock import pytest from dummyserver.server import HAS_IPV6 from dummyserver.testcase import HTTPDummyServerTestCase, IPv6HTTPDummyServerTestCase from urllib3 import HTTPHeaderDict, HTTPResponse, request from urllib3.connectionp... | body | 515 | 8 |
urllib3/urllib3 | train | 522 | d68579d357f02b6d39b1cc93a9ee8f27a4e99793 | train | test/with_dummyserver/test_poolmanager.py | train | urllib3/urllib3:test/with_dummyserver/test_poolmanager.py | 529 | 12 | assert | test_top_level_request_with_json_with_httpheaderdict | import gzip
from test import LONG_TIMEOUT
from unittest import mock
import pytest
from dummyserver.server import HAS_IPV6
from dummyserver.testcase import HTTPDummyServerTestCase, IPv6HTTPDummyServerTestCase
from urllib3 import HTTPHeaderDict, HTTPResponse, request
from urllib3.connectionpool import port_by_scheme
fr... | body | modified | ec9253f9dd7147904d2938ab8ce01dc7b173b6b198ab6e5025f91d3f23424f6e | assert|test_top_level_request_with_json_with_httpheaderdict|import gzip from test import LONG_TIMEOUT from unittest import mock import pytest from dummyserver.server import HAS_IPV6 from dummyserver.testcase import HTTPDummyServerTestCase, IPv6HTTPDummyServerTestCase from urllib3 import HTTPHeaderDict, HTTPResponse, re... | body | 529 | 12 |
urllib3/urllib3 | train | 522 | d68579d357f02b6d39b1cc93a9ee8f27a4e99793 | train | test/with_dummyserver/test_poolmanager.py | train | urllib3/urllib3:test/with_dummyserver/test_poolmanager.py | 530 | 12 | assert | test_top_level_request_with_json_with_httpheaderdict | import gzip
from test import LONG_TIMEOUT
from unittest import mock
import pytest
from dummyserver.server import HAS_IPV6
from dummyserver.testcase import HTTPDummyServerTestCase, IPv6HTTPDummyServerTestCase
from urllib3 import HTTPHeaderDict, HTTPResponse, request
from urllib3.connectionpool import port_by_scheme
fr... | r.headers["Content-Type"].replace( " ", "" ).split(",") | modified | c29ae6224fcf6c44b46c8cfdfa7fc3887528f4baf57a2517eeb82c08c90a4200 | assert|test_top_level_request_with_json_with_httpheaderdict|import gzip from test import LONG_TIMEOUT from unittest import mock import pytest from dummyserver.server import HAS_IPV6 from dummyserver.testcase import HTTPDummyServerTestCase, IPv6HTTPDummyServerTestCase from urllib3 import HTTPHeaderDict, HTTPResponse, re... | r.headers["Content-Type"].replace( " ", "" ).split(",") | 530 | 12 |
urllib3/urllib3 | train | 522 | d68579d357f02b6d39b1cc93a9ee8f27a4e99793 | train | test/with_dummyserver/test_poolmanager.py | train | urllib3/urllib3:test/with_dummyserver/test_poolmanager.py | 536 | 13 | pytest.raises | test_top_level_request_with_body_and_json | import gzip
from test import LONG_TIMEOUT
from unittest import mock
import pytest
from dummyserver.server import HAS_IPV6
from dummyserver.testcase import HTTPDummyServerTestCase, IPv6HTTPDummyServerTestCase
from urllib3 import HTTPHeaderDict, HTTPResponse, request
from urllib3.connectionpool import port_by_scheme
fr... | TypeError, match=match) | modified | 345518191c8976a171cd31bf6a20ca40ffaaed3aca83d1324629d8ce35eb0b07 | pytest.raises|test_top_level_request_with_body_and_json|import gzip from test import LONG_TIMEOUT from unittest import mock import pytest from dummyserver.server import HAS_IPV6 from dummyserver.testcase import HTTPDummyServerTestCase, IPv6HTTPDummyServerTestCase from urllib3 import HTTPHeaderDict, HTTPResponse, reques... | TypeError, match=match) | 536 | 13 |
urllib3/urllib3 | train | 523 | 684bb9222a6b5442ad881acb6fbff1086b9b8c04 | train | test/with_dummyserver/test_chunked_transfer.py | train | urllib3/urllib3:test/with_dummyserver/test_chunked_transfer.py | 51 | 12 | assert | test_chunks | import socket
from typing import List, Optional, Union
import pytest
from dummyserver.testcase import (
ConnectionMarker,
SocketDummyServerTestCase,
consume_socket,
)
from urllib3 import HTTPConnectionPool
from urllib3.util import SKIP_HEADER
from urllib3.util.retry import Retry
# Retry failed tests
pyte... | self.buffer | added | 1ed1ccdc9c0345e2020b6d7cde3ac1b5d614979bfbdb282e5bdade9a64edb7ca | assert|test_chunks|import socket from typing import List, Optional, Union import pytest from dummyserver.testcase import ( ConnectionMarker, SocketDummyServerTestCase, consume_socket, ) from urllib3 import HTTPConnectionPool from urllib3.util import SKIP_HEADER from urllib3.util.retry import Retry # Retry failed tests ... | null | null | null |
urllib3/urllib3 | train | 523 | 684bb9222a6b5442ad881acb6fbff1086b9b8c04 | train | test/with_dummyserver/test_chunked_transfer.py | train | urllib3/urllib3:test/with_dummyserver/test_chunked_transfer.py | 71 | 16 | assert | _test_body | import socket
from typing import List, Optional, Union
import pytest
from dummyserver.testcase import (
ConnectionMarker,
SocketDummyServerTestCase,
consume_socket,
)
from urllib3 import HTTPConnectionPool
from urllib3.util import SKIP_HEADER
from urllib3.util.retry import Retry
# Retry failed tests
pyte... | body | added | ceda045ece0da91021b15fefb049a71a92adc1429ed2809d96031a8ce9a5de5d | assert|_test_body|import socket from typing import List, Optional, Union import pytest from dummyserver.testcase import ( ConnectionMarker, SocketDummyServerTestCase, consume_socket, ) from urllib3 import HTTPConnectionPool from urllib3.util import SKIP_HEADER from urllib3.util.retry import Retry # Retry failed tests p... | null | null | null |
urllib3/urllib3 | train | 523 | 684bb9222a6b5442ad881acb6fbff1086b9b8c04 | train | test/with_dummyserver/test_chunked_transfer.py | train | urllib3/urllib3:test/with_dummyserver/test_chunked_transfer.py | 146 | 12 | assert | test_preserve_user_agent_header | import socket
from typing import List, Optional, Union
import pytest
from dummyserver.testcase import (
ConnectionMarker,
SocketDummyServerTestCase,
consume_socket,
)
from urllib3 import HTTPConnectionPool
from urllib3.util import SKIP_HEADER
from urllib3.util.retry import Retry
# Retry failed tests
pyte... | b"user-agent: test-agent" | added | 6cdfb7061a2db69f986d467f6e482ba26b293a2b5bb6514f868a88bb2bbc2257 | assert|test_preserve_user_agent_header|import socket from typing import List, Optional, Union import pytest from dummyserver.testcase import ( ConnectionMarker, SocketDummyServerTestCase, consume_socket, ) from urllib3 import HTTPConnectionPool from urllib3.util import SKIP_HEADER from urllib3.util.retry import Retry #... | null | null | null |
urllib3/urllib3 | train | 523 | 684bb9222a6b5442ad881acb6fbff1086b9b8c04 | train | test/with_dummyserver/test_chunked_transfer.py | train | urllib3/urllib3:test/with_dummyserver/test_chunked_transfer.py | 189 | 12 | assert | test_preserve_transfer_encoding_header | import socket
from typing import List, Optional, Union
import pytest
from dummyserver.testcase import (
ConnectionMarker,
SocketDummyServerTestCase,
consume_socket,
)
from urllib3 import HTTPConnectionPool
from urllib3.util import SKIP_HEADER
from urllib3.util.retry import Retry
# Retry failed tests
pyte... | b"transfer-encoding: test-transfer-encoding" | added | 39f31c90fc5a53fa4f1f1536372915ff9be87b68b9bb61f134deae3e8abe1aec | assert|test_preserve_transfer_encoding_header|import socket from typing import List, Optional, Union import pytest from dummyserver.testcase import ( ConnectionMarker, SocketDummyServerTestCase, consume_socket, ) from urllib3 import HTTPConnectionPool from urllib3.util import SKIP_HEADER from urllib3.util.retry import ... | null | null | null |
urllib3/urllib3 | train | 524 | 6953e36b63b2167a683be26c6acb17c47de7fcf5 | train | dummyserver/testcase.py | train | urllib3/urllib3:dummyserver/testcase.py | 107 | 16 | assert | import socket
import threading
from contextlib import contextmanager
from typing import Any, Callable, ClassVar, Dict, Generator, Iterable, Optional
import pytest
from tornado import httpserver, ioloop, web
from dummyserver.handlers import TestingApp
from dummyserver.proxy import ProxyHandler
from dummyserver.server ... | expected_value_bytes | modified | 8f9a010d0a8eb3986cfe8401372e2282c692f37c8efceec32ea5a1b383bb17d5 | assert||import socket import threading from contextlib import contextmanager from typing import Any, Callable, ClassVar, Dict, Generator, Iterable, Optional import pytest from tornado import httpserver, ioloop, web from dummyserver.handlers import TestingApp from dummyserver.proxy import ProxyHandler from dummyserver.s... | expected_value_bytes | 107 | 16 | |
urllib3/urllib3 | train | 524 | 6953e36b63b2167a683be26c6acb17c47de7fcf5 | train | dummyserver/testcase.py | train | urllib3/urllib3:dummyserver/testcase.py | 108 | 8 | assert | import socket
import threading
from contextlib import contextmanager
from typing import Any, Callable, ClassVar, Dict, Generator, Iterable, Optional
import pytest
from tornado import httpserver, ioloop, web
from dummyserver.handlers import TestingApp
from dummyserver.proxy import ProxyHandler
from dummyserver.server ... | header_titles | modified | e42b204f82333868f372b454f44f6f1ec3e7bcb8a26df2e465e2b544da3061af | assert||import socket import threading from contextlib import contextmanager from typing import Any, Callable, ClassVar, Dict, Generator, Iterable, Optional import pytest from tornado import httpserver, ioloop, web from dummyserver.handlers import TestingApp from dummyserver.proxy import ProxyHandler from dummyserver.s... | header_titles | 108 | 8 | |
urllib3/urllib3 | train | 524 | 6953e36b63b2167a683be26c6acb17c47de7fcf5 | train | test/with_dummyserver/test_proxy_poolmanager.py | train | urllib3/urllib3:test/with_dummyserver/test_proxy_poolmanager.py | 163 | 12 | assert | test_https_conn_failed | 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, IPv6HTTPDummyPr... | HTTPSProxyError | modified | c29a8756837d183e53bd69f651e5c79e578e39fc5e36af8548d7c100efecd01a | assert|test_https_conn_failed|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 HTTPDummyPr... | HTTPSProxyError | 161 | 12 |
urllib3/urllib3 | train | 524 | 6953e36b63b2167a683be26c6acb17c47de7fcf5 | train | test/with_dummyserver/test_proxy_poolmanager.py | train | urllib3/urllib3:test/with_dummyserver/test_proxy_poolmanager.py | 247 | 12 | assert | test_cross_host_redirect | 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, IPv6HTTPDummyPr... | None | added | 5f0cdb64aa97a5cf79b304efd1eca0a0798556e653b4241b9e4033294c09ca83 | assert|test_cross_host_redirect|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 HTTPDummy... | null | null | null |
urllib3/urllib3 | train | 524 | 6953e36b63b2167a683be26c6acb17c47de7fcf5 | train | test/with_dummyserver/test_proxy_poolmanager.py | train | urllib3/urllib3:test/with_dummyserver/test_proxy_poolmanager.py | 282 | 12 | assert | test_headers | 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, IPv6HTTPDummyPr... | "dickory" | modified | a91b85045e3828b7227a9509ab66cdc04ca7fe64c56d395eead1ada08f4b864c | assert|test_headers|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 HTTPDummyProxyTestCas... | "dickory" | 282 | 12 |
urllib3/urllib3 | train | 524 | 6953e36b63b2167a683be26c6acb17c47de7fcf5 | train | test/with_dummyserver/test_proxy_poolmanager.py | train | urllib3/urllib3:test/with_dummyserver/test_proxy_poolmanager.py | 409 | 12 | assert | test_headerdict | 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, IPv6HTTPDummyPr... | "quux" | added | eb4d0dcddd9a1665639532a25331618adaf1eca901ced4867301ea589531b98d | assert|test_headerdict|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 HTTPDummyProxyTest... | null | null | null |
urllib3/urllib3 | train | 525 | 9344db2162082a4bc211c44f8675597eff971d9c | train | test/with_dummyserver/test_connectionpool.py | train | urllib3/urllib3:test/with_dummyserver/test_connectionpool.py | 369 | 17 | pytest.raises | test_connection_error_retries | import io
import logging
import socket
import sys
import time
import warnings
from test import LONG_TIMEOUT, SHORT_TIMEOUT
from threading import Event
from typing import Dict, List, Optional, Tuple, Type, Union
from unittest import mock
from urllib.parse import urlencode
import pytest
from dummyserver.server import H... | MaxRetryError) | added | b7e6a9b08a1c91b89986c09f0f417a8fbac424ec5ca78e6a95cfd81022feadce | pytest.raises|test_connection_error_retries|import io import logging import socket import sys import time import warnings from test import LONG_TIMEOUT, SHORT_TIMEOUT from threading import Event from typing import Dict, List, Optional, Tuple, Type, Union from unittest import mock from urllib.parse import urlencode impo... | null | null | null |
urllib3/urllib3 | train | 525 | 9344db2162082a4bc211c44f8675597eff971d9c | train | test/with_dummyserver/test_connectionpool.py | train | urllib3/urllib3:test/with_dummyserver/test_connectionpool.py | 490 | 12 | assert | test_post_with_urlencode | import io
import logging
import socket
import sys
import time
import warnings
from test import LONG_TIMEOUT, SHORT_TIMEOUT
from threading import Event
from typing import Dict, List, Optional, Tuple, Type, Union
from unittest import mock
from urllib.parse import urlencode
import pytest
from dummyserver.server import H... | urlencode(data) | added | ac2c8130450b8310f12c5e5c92c370b55768cb920256cca4d7b596976be95766 | assert|test_post_with_urlencode|import io import logging import socket import sys import time import warnings from test import LONG_TIMEOUT, SHORT_TIMEOUT from threading import Event from typing import Dict, List, Optional, Tuple, Type, Union from unittest import mock from urllib.parse import urlencode import pytest fr... | null | null | null |
urllib3/urllib3 | train | 525 | 9344db2162082a4bc211c44f8675597eff971d9c | train | test/with_dummyserver/test_connectionpool.py | train | urllib3/urllib3:test/with_dummyserver/test_connectionpool.py | 774 | 12 | assert | test_chunked_gzip | import io
import logging
import socket
import sys
import time
import warnings
from test import LONG_TIMEOUT, SHORT_TIMEOUT
from threading import Event
from typing import Dict, List, Optional, Tuple, Type, Union
from unittest import mock
from urllib.parse import urlencode
import pytest
from dummyserver.server import H... | response.read() | added | 54f51f4a5d08545d8cb04b35847e119b3a941dbba316994952dd8918d2616384 | assert|test_chunked_gzip|import io import logging import socket import sys import time import warnings from test import LONG_TIMEOUT, SHORT_TIMEOUT from threading import Event from typing import Dict, List, Optional, Tuple, Type, Union from unittest import mock from urllib.parse import urlencode import pytest from dumm... | null | null | null |
urllib3/urllib3 | train | 525 | 9344db2162082a4bc211c44f8675597eff971d9c | train | test/with_dummyserver/test_connectionpool.py | train | urllib3/urllib3:test/with_dummyserver/test_connectionpool.py | 1,037 | 17 | pytest.raises | test_max_retry | import io
import logging
import socket
import sys
import time
import warnings
from test import LONG_TIMEOUT, SHORT_TIMEOUT
from threading import Event
from typing import Dict, List, Optional, Tuple, Type, Union
from unittest import mock
from urllib.parse import urlencode
import pytest
from dummyserver.server import H... | MaxRetryError) | added | d4165e786d0f57817d37eb194a4ba719d41e3355b67152f0687ab8866087bd5d | pytest.raises|test_max_retry|import io import logging import socket import sys import time import warnings from test import LONG_TIMEOUT, SHORT_TIMEOUT from threading import Event from typing import Dict, List, Optional, Tuple, Type, Union from unittest import mock from urllib.parse import urlencode import pytest from ... | null | null | null |
urllib3/urllib3 | train | 526 | 556470d2d0087a54caa0b3e4df2a90af7773cf5b | train | test/test_ssltransport.py | train | urllib3/urllib3:test/test_ssltransport.py | 351 | 16 | assert | test_tls_in_tls_tunnel | import platform
import select
import socket
import ssl
from unittest 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... | None | modified | 04da769d5bdc552fb0fb9b548b41fb6e3d93e6f4342f8706265b7f8e2757a23f | assert|test_tls_in_tls_tunnel|import platform import select import socket import ssl from unittest 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 im... | None | 351 | 16 |
urllib3/urllib3 | train | 526 | 556470d2d0087a54caa0b3e4df2a90af7773cf5b | train | test/test_ssltransport.py | train | urllib3/urllib3:test/test_ssltransport.py | 370 | 17 | pytest.raises | test_wrong_sni_hint | import platform
import select
import socket
import ssl
from unittest 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... | ssl.SSLCertVerificationError) | modified | 77b0128184822bb1a8b275f5cde9493304ba06c9b529ac8693587b87a92d56d2 | pytest.raises|test_wrong_sni_hint|import platform import select import socket import ssl from unittest 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.ssltranspor... | ssl.SSLCertVerificationError) | 370 | 17 |
urllib3/urllib3 | train | 526 | 556470d2d0087a54caa0b3e4df2a90af7773cf5b | train | test/test_ssltransport.py | train | urllib3/urllib3:test/test_ssltransport.py | 400 | 16 | assert | test_tls_in_tls_makefile_raw_rw_binary | import platform
import select
import socket
import ssl
from unittest 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... | None | modified | a9f764cdc32b94a5b6be90be374d6c543ca6580967599e04e17a2a47fa6e2618 | assert|test_tls_in_tls_makefile_raw_rw_binary|import platform import select import socket import ssl from unittest 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... | None | 400 | 16 |
urllib3/urllib3 | train | 526 | 556470d2d0087a54caa0b3e4df2a90af7773cf5b | train | test/test_ssltransport.py | train | urllib3/urllib3:test/test_ssltransport.py | 520 | 13 | pytest.raises | test_various_flags_errors | import platform
import select
import socket
import ssl
from unittest 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... | ValueError) | modified | bf16f98657b960bb4590e848471861acc5949967af65c33bfc16512f190f4fd7 | pytest.raises|test_various_flags_errors|import platform import select import socket import ssl from unittest 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.ssltr... | ValueError) | 520 | 13 |
urllib3/urllib3 | train | 527 | c4e7fdd152b8c61fa1bebe128c6d26d45ef1e493 | train | test/contrib/test_pyopenssl.py | train | urllib3/urllib3:test/contrib/test_pyopenssl.py | 65 | 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 | ed87cbf54eeb06a3877f3e923b70dc5c0d41d249e970fac23ebd8e859854b001 | 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 | 66 | 8 |
urllib3/urllib3 | train | 527 | c4e7fdd152b8c61fa1bebe128c6d26d45ef1e493 | train | test/contrib/test_pyopenssl.py | train | urllib3/urllib3:test/contrib/test_pyopenssl.py | 74 | 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 | c22ccfe14b5050fcaf0d074b0931a789e5e2a7567674672c489c82617c8ec928 | 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 | 75 | 8 |
urllib3/urllib3 | train | 527 | c4e7fdd152b8c61fa1bebe128c6d26d45ef1e493 | train | test/contrib/test_pyopenssl.py | train | urllib3/urllib3:test/contrib/test_pyopenssl.py | 84 | 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 | bf53c0de3969ea7e19e2891b49ffd42076ceb680d7817e9b533ecd15af54041d | 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 | 85 | 8 |
urllib3/urllib3 | train | 527 | c4e7fdd152b8c61fa1bebe128c6d26d45ef1e493 | train | test/contrib/test_pyopenssl.py | train | urllib3/urllib3:test/contrib/test_pyopenssl.py | 99 | 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 | eddcd5661629960a759be084079dd2b4424058984d3e238599645930912698fb | 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) | 100 | 8 |
urllib3/urllib3 | train | 527 | c4e7fdd152b8c61fa1bebe128c6d26d45ef1e493 | train | test/with_dummyserver/test_https.py | train | urllib3/urllib3:test/with_dummyserver/test_https.py | 325 | 12 | assert | test_verified_with_bad_ca_certs | import datetime
import logging
import os.path
import shutil
import ssl
import sys
import tempfile
import warnings
from pathlib import Path
from test import (
LONG_TIMEOUT,
SHORT_TIMEOUT,
TARPIT_HOST,
notSecureTransport,
requires_network,
requires_ssl_context_keyfile_password,
resolvesLocalho... | "certificate verify failed" in str(e.value.reason) # PyPy is more specific or "self signed certificate in certificate chain" in str(e.value.reason) | modified | e97e5ecb3987cde8e583b8d5ba8e8af65f17fa0b250edf59ef58cdbd19a99c1e | assert|test_verified_with_bad_ca_certs|import datetime import logging import os.path import shutil import ssl import sys import tempfile import warnings from pathlib import Path from test import ( LONG_TIMEOUT, SHORT_TIMEOUT, TARPIT_HOST, notSecureTransport, requires_network, requires_ssl_context_keyfile_password, reso... | "certificate verify failed" in str(e.value.reason) # PyPy is more specific or "self signed certificate in certificate chain" in str(e.value.reason) | 325 | 12 |
urllib3/urllib3 | train | 527 | c4e7fdd152b8c61fa1bebe128c6d26d45ef1e493 | train | test/with_dummyserver/test_https.py | train | urllib3/urllib3:test/with_dummyserver/test_https.py | 714 | 16 | assert | test_ssl_wrong_system_time | import datetime
import logging
import os.path
import shutil
import ssl
import sys
import tempfile
import warnings
from pathlib import Path
from test import (
LONG_TIMEOUT,
SHORT_TIMEOUT,
TARPIT_HOST,
notSecureTransport,
requires_network,
requires_ssl_context_keyfile_password,
resolvesLocalho... | isinstance(warning.message, Warning) | modified | aec881ff395d29fe6fcf73454af3bf7c6a38f858cafbfbc7325856dfb45784cf | assert|test_ssl_wrong_system_time|import datetime import logging import os.path import shutil import ssl import sys import tempfile import warnings from pathlib import Path from test import ( LONG_TIMEOUT, SHORT_TIMEOUT, TARPIT_HOST, notSecureTransport, requires_network, requires_ssl_context_keyfile_password, resolvesL... | isinstance(warning.message, Warning) | 714 | 16 |
urllib3/urllib3 | train | 527 | c4e7fdd152b8c61fa1bebe128c6d26d45ef1e493 | train | test/with_dummyserver/test_https.py | train | urllib3/urllib3:test/with_dummyserver/test_https.py | 765 | 16 | assert | test_tls_protocol_name_of_socket | import datetime
import logging
import os.path
import shutil
import ssl
import sys
import tempfile
import warnings
from pathlib import Path
from test import (
LONG_TIMEOUT,
SHORT_TIMEOUT,
TARPIT_HOST,
notSecureTransport,
requires_network,
requires_ssl_context_keyfile_password,
resolvesLocalho... | self.tls_protocol_name | modified | de72cc7a8117b37d3d0e8f32f48a2d06f36b8ab820834d1213fb9b4d16dbf295 | assert|test_tls_protocol_name_of_socket|import datetime import logging import os.path import shutil import ssl import sys import tempfile import warnings from pathlib import Path from test import ( LONG_TIMEOUT, SHORT_TIMEOUT, TARPIT_HOST, notSecureTransport, requires_network, requires_ssl_context_keyfile_password, res... | self.tls_protocol_name | 765 | 16 |
urllib3/urllib3 | train | 527 | c4e7fdd152b8c61fa1bebe128c6d26d45ef1e493 | train | test/with_dummyserver/test_https.py | train | urllib3/urllib3:test/with_dummyserver/test_https.py | 934 | 8 | assert | test_ssl_context_ssl_version_uses_ssl_min_max_versions | import datetime
import logging
import os.path
import shutil
import ssl
import sys
import tempfile
import warnings
from pathlib import Path
from test import (
LONG_TIMEOUT,
SHORT_TIMEOUT,
TARPIT_HOST,
notSecureTransport,
requires_network,
requires_ssl_context_keyfile_password,
resolvesLocalho... | self.tls_version() | modified | 3a20482444b163e173c6159caf142b54518e4d786811688ee36412a1e51966b5 | assert|test_ssl_context_ssl_version_uses_ssl_min_max_versions|import datetime import logging import os.path import shutil import ssl import sys import tempfile import warnings from pathlib import Path from test import ( LONG_TIMEOUT, SHORT_TIMEOUT, TARPIT_HOST, notSecureTransport, requires_network, requires_ssl_context... | self.tls_version() | 934 | 8 |
urllib3/urllib3 | train | 528 | d7193ac1571022484c8078df6068dffa9f8c634d | train | test/test_retry.py | train | urllib3/urllib3:test/test_retry.py | 216 | 13 | pytest.raises | test_disabled | from test import DUMMY_POOL
from typing import Optional
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 imp... | MaxRetryError) | modified | f5af71b15dd5c44272ee208a598241767f36fb0d8532cbf027665f11852d7d6b | pytest.raises|test_disabled|from test import DUMMY_POOL from typing import Optional 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 i... | MaxRetryError) | 216 | 13 |
urllib3/urllib3 | train | 528 | d7193ac1571022484c8078df6068dffa9f8c634d | train | test/test_ssltransport.py | train | urllib3/urllib3:test/test_ssltransport.py | 542 | 17 | pytest.raises | test_wrap_ssl_read_error | import platform
import select
import socket
import ssl
from unittest 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... | ssl.SSLError) | modified | 5457f8d7e9da9e7de36cb5949501f78affca756f0ce0f8042fecc11aef95923f | pytest.raises|test_wrap_ssl_read_error|import platform import select import socket import ssl from unittest 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.ssltra... | ssl.SSLError) | 542 | 17 |
urllib3/urllib3 | train | 528 | d7193ac1571022484c8078df6068dffa9f8c634d | train | test/test_util.py | train | urllib3/urllib3:test/test_util.py | 855 | 8 | assert_* | test_ssl_wrap_socket_creates_new_context | import io
import logging
import socket
import ssl
import sys
import warnings
from itertools import chain
from test import ImportBlocker, ModuleStash, notBrotli, onlyBrotli
from unittest.mock import Mock, patch
import pytest
from urllib3 import add_stderr_logger, disable_warnings, util
from urllib3.exceptions import (... | "CERT_REQUIRED") | modified | b8a3e92609dbb71e7e2f5901a83f57ef54200d043523d503ba559d7643a70d49 | assert_*|test_ssl_wrap_socket_creates_new_context|import io import logging import socket import ssl import sys import warnings from itertools import chain from test import ImportBlocker, ModuleStash, notBrotli, onlyBrotli from unittest.mock import Mock, patch import pytest from urllib3 import add_stderr_logger, disable... | "CERT_REQUIRED") | 855 | 8 |
urllib3/urllib3 | train | 528 | d7193ac1571022484c8078df6068dffa9f8c634d | train | test/with_dummyserver/test_connectionpool.py | train | urllib3/urllib3:test/with_dummyserver/test_connectionpool.py | 543 | 12 | assert | test_check_gzip | import io
import logging
import socket
import sys
import time
import warnings
from test import LONG_TIMEOUT, SHORT_TIMEOUT
from threading import Event
from typing import Dict, List, Optional, Tuple, Type, Union
from unittest import mock
from urllib.parse import urlencode
import pytest
from dummyserver.server import H... | b"hello, world!" | modified | 4fdcc4179a0098637093c89d49c2dfda7acf7a8d1cdaf620f0a44aa93c5433df | assert|test_check_gzip|import io import logging import socket import sys import time import warnings from test import LONG_TIMEOUT, SHORT_TIMEOUT from threading import Event from typing import Dict, List, Optional, Tuple, Type, Union from unittest import mock from urllib.parse import urlencode import pytest from dummys... | b"hello, world!" | 543 | 12 |
urllib3/urllib3 | train | 528 | d7193ac1571022484c8078df6068dffa9f8c634d | train | test/with_dummyserver/test_connectionpool.py | train | urllib3/urllib3:test/with_dummyserver/test_connectionpool.py | 838 | 12 | assert | test_default_user_agent_header | import io
import logging
import socket
import sys
import time
import warnings
from test import LONG_TIMEOUT, SHORT_TIMEOUT
from threading import Event
from typing import Dict, List, Optional, Tuple, Type, Union
from unittest import mock
from urllib.parse import urlencode
import pytest
from dummyserver.server import H... | custom_ua | modified | 1a1d22e8982a550c1f5f1e0df7be6cd08a2f2a0d73305b44fccb756dfeb6f3ba | assert|test_default_user_agent_header|import io import logging import socket import sys import time import warnings from test import LONG_TIMEOUT, SHORT_TIMEOUT from threading import Event from typing import Dict, List, Optional, Tuple, Type, Union from unittest import mock from urllib.parse import urlencode import pyt... | custom_ua | 838 | 12 |
urllib3/urllib3 | train | 528 | d7193ac1571022484c8078df6068dffa9f8c634d | train | test/with_dummyserver/test_https.py | train | urllib3/urllib3:test/with_dummyserver/test_https.py | 510 | 12 | assert | test_assert_invalid_fingerprint | import datetime
import logging
import os.path
import shutil
import ssl
import sys
import tempfile
import warnings
from pathlib import Path
from test import (
LONG_TIMEOUT,
SHORT_TIMEOUT,
TARPIT_HOST,
notSecureTransport,
requires_network,
requires_ssl_context_keyfile_password,
resolvesLocalho... | f'Fingerprints did not match. Expected "{expected}", got "{got}"' | modified | ca41a74c0d88fe517179cf1d4c5b5e28dc50560b06753d313e6bbc37b123f254 | assert|test_assert_invalid_fingerprint|import datetime import logging import os.path import shutil import ssl import sys import tempfile import warnings from pathlib import Path from test import ( LONG_TIMEOUT, SHORT_TIMEOUT, TARPIT_HOST, notSecureTransport, requires_network, requires_ssl_context_keyfile_password, reso... | f'Fingerprints did not match. Expected "{expected}", got "{got}"' | 510 | 12 |
urllib3/urllib3 | train | 528 | d7193ac1571022484c8078df6068dffa9f8c634d | train | test/with_dummyserver/test_proxy_poolmanager.py | train | urllib3/urllib3:test/with_dummyserver/test_proxy_poolmanager.py | 203 | 17 | pytest.raises | test_proxy_verified | 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, IPv6HTTPDummyPr... | MaxRetryError, match="doesn't match|IP address mismatch") | modified | c2ad45b065bf040b0f513ff0aa19c8fff0aaacf6eb9214e0f18185d84e9350bd | pytest.raises|test_proxy_verified|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 HTTPDum... | MaxRetryError, match="doesn't match|IP address mismatch") | 203 | 17 |
urllib3/urllib3 | train | 528 | d7193ac1571022484c8078df6068dffa9f8c634d | train | test/with_dummyserver/test_socketlevel.py | train | urllib3/urllib3:test/with_dummyserver/test_socketlevel.py | 1,265 | 8 | assert | test_ssl_failed_fingerprint_verification | # TODO: Break this module up into pieces. Maybe group by functionality tested
# rather than the socket level-ness of it.
import errno
import os
import os.path
import select
import shutil
import socket
import ssl
import tempfile
from collections import OrderedDict
from test import (
LONG_TIMEOUT,
SHORT_TIMEOUT,
... | isinstance(cm.value.reason, SSLError) | modified | f7fe6e04763b3cf0af44c3734959d52a57de371ec0dcbbf8a4b75508d4cceefe | assert|test_ssl_failed_fingerprint_verification|# TODO: Break this module up into pieces. Maybe group by functionality tested # rather than the socket level-ness of it. import errno import os import os.path import select import shutil import socket import ssl import tempfile from collections import OrderedDict from tes... | isinstance(cm.value.reason, SSLError) | 1,265 | 8 |
urllib3/urllib3 | train | 529 | 34e11a22fb9357c5c52705bf508982cc471d96cb | train | test/with_dummyserver/test_proxy_poolmanager.py | train | urllib3/urllib3:test/with_dummyserver/test_proxy_poolmanager.py | 105 | 17 | pytest.raises | test_https_proxy_securetransport_not_supported | import os.path
import shutil
import socket
import tempfile
from test import LONG_TIMEOUT, SHORT_TIMEOUT, onlySecureTransport, withPyOpenSSL
import pytest
import trustme
import urllib3.exceptions
from dummyserver.server import DEFAULT_CA, HAS_IPV6, get_unreachable_address
from dummyserver.testcase import HTTPDummyProx... | ProxySchemeUnsupported, match="isn't available on non-native SSLContext") | modified | ddd10e0e3d30d3f3fd57c5bf21146e159fd664eed9abe93801f51f9b795a4866 | pytest.raises|test_https_proxy_securetransport_not_supported|import os.path import shutil import socket import tempfile from test import LONG_TIMEOUT, SHORT_TIMEOUT, onlySecureTransport, withPyOpenSSL import pytest import trustme import urllib3.exceptions from dummyserver.server import DEFAULT_CA, HAS_IPV6, get_unreach... | ProxySchemeUnsupported, match="isn't available on non-native SSLContext") | 104 | 17 |
urllib3/urllib3 | train | 529 | 34e11a22fb9357c5c52705bf508982cc471d96cb | train | test/with_dummyserver/test_proxy_poolmanager.py | train | urllib3/urllib3:test/with_dummyserver/test_proxy_poolmanager.py | 153 | 17 | pytest.raises | test_proxy_conn_fail_from_dns | import os.path
import shutil
import socket
import tempfile
from test import LONG_TIMEOUT, SHORT_TIMEOUT, onlySecureTransport, withPyOpenSSL
import pytest
import trustme
import urllib3.exceptions
from dummyserver.server import DEFAULT_CA, HAS_IPV6, get_unreachable_address
from dummyserver.testcase import HTTPDummyProx... | MaxRetryError) | added | 35eabaa54889f9cc755dec4547e0e0ea89bffefa7c6fc4cc542182242028cd30 | pytest.raises|test_proxy_conn_fail_from_dns|import os.path import shutil import socket import tempfile from test import LONG_TIMEOUT, SHORT_TIMEOUT, onlySecureTransport, withPyOpenSSL import pytest import trustme import urllib3.exceptions from dummyserver.server import DEFAULT_CA, HAS_IPV6, get_unreachable_address from... | null | null | null |
urllib3/urllib3 | train | 529 | 34e11a22fb9357c5c52705bf508982cc471d96cb | train | test/with_dummyserver/test_proxy_poolmanager.py | train | urllib3/urllib3:test/with_dummyserver/test_proxy_poolmanager.py | 369 | 12 | assert | test_https_headers | import os.path
import shutil
import socket
import tempfile
from test import LONG_TIMEOUT, SHORT_TIMEOUT, onlySecureTransport, withPyOpenSSL
import pytest
import trustme
import urllib3.exceptions
from dummyserver.server import DEFAULT_CA, HAS_IPV6, get_unreachable_address
from dummyserver.testcase import HTTPDummyProx... | "bar" | added | e8726391b67a84141f482f197ef3ae82ac02f6819c3fa64a1dd13031e26b9963 | assert|test_https_headers|import os.path import shutil import socket import tempfile from test import LONG_TIMEOUT, SHORT_TIMEOUT, onlySecureTransport, withPyOpenSSL import pytest import trustme import urllib3.exceptions from dummyserver.server import DEFAULT_CA, HAS_IPV6, get_unreachable_address from dummyserver.testc... | null | null | null |
urllib3/urllib3 | train | 529 | 34e11a22fb9357c5c52705bf508982cc471d96cb | train | test/with_dummyserver/test_proxy_poolmanager.py | train | urllib3/urllib3:test/with_dummyserver/test_proxy_poolmanager.py | 405 | 12 | assert | test_https_headers_forwarding_for_https | import os.path
import shutil
import socket
import tempfile
from test import LONG_TIMEOUT, SHORT_TIMEOUT, onlySecureTransport, withPyOpenSSL
import pytest
import trustme
import urllib3.exceptions
from dummyserver.server import DEFAULT_CA, HAS_IPV6, get_unreachable_address
from dummyserver.testcase import HTTPDummyProx... | f"{self.https_host}:{self.https_port}" | added | 36df3044a565c804653310863a5370413687e0e1cbc68759470423559eb0d45e | assert|test_https_headers_forwarding_for_https|import os.path import shutil import socket import tempfile from test import LONG_TIMEOUT, SHORT_TIMEOUT, onlySecureTransport, withPyOpenSSL import pytest import trustme import urllib3.exceptions from dummyserver.server import DEFAULT_CA, HAS_IPV6, get_unreachable_address f... | null | null | null |
urllib3/urllib3 | train | 529 | 34e11a22fb9357c5c52705bf508982cc471d96cb | train | test/with_dummyserver/test_socketlevel.py | train | urllib3/urllib3:test/with_dummyserver/test_socketlevel.py | 356 | 13 | pytest.raises | test_load_keyfile_with_invalid_password | # TODO: Break this module up into pieces. Maybe group by functionality tested
# rather than the socket level-ness of it.
import errno
import os
import os.path
import select
import shutil
import socket
import ssl
import tempfile
from collections import OrderedDict
from test import (
LONG_TIMEOUT,
SHORT_TIMEOUT,
... | expected_error) | modified | c2973dc0adb384bc5ef32ebd3ad93e26101dde4da61304de902113bfde70665c | pytest.raises|test_load_keyfile_with_invalid_password|# TODO: Break this module up into pieces. Maybe group by functionality tested # rather than the socket level-ness of it. import errno import os import os.path import select import shutil import socket import ssl import tempfile from collections import OrderedDict fr... | expected_error) | 355 | 13 |
urllib3/urllib3 | train | 529 | 34e11a22fb9357c5c52705bf508982cc471d96cb | train | test/with_dummyserver/test_socketlevel.py | train | urllib3/urllib3:test/with_dummyserver/test_socketlevel.py | 881 | 12 | assert | test_release_conn_param_is_respected_after_timeout_retry | # TODO: Break this module up into pieces. Maybe group by functionality tested
# rather than the socket level-ness of it.
import errno
import os
import os.path
import select
import shutil
import socket
import ssl
import tempfile
from collections import OrderedDict
from test import (
LONG_TIMEOUT,
SHORT_TIMEOUT,
... | rlist | modified | 24c92b00e779dec18722140e2201ea455ad3c53d933cc2f1e702b2a5058c5457 | assert|test_release_conn_param_is_respected_after_timeout_retry|# TODO: Break this module up into pieces. Maybe group by functionality tested # rather than the socket level-ness of it. import errno import os import os.path import select import shutil import socket import ssl import tempfile from collections import Orde... | rlist | 880 | 12 |
urllib3/urllib3 | train | 529 | 34e11a22fb9357c5c52705bf508982cc471d96cb | train | test/with_dummyserver/test_socketlevel.py | train | urllib3/urllib3:test/with_dummyserver/test_socketlevel.py | 1,293 | 8 | assert | test_ssl_failed_fingerprint_verification | # TODO: Break this module up into pieces. Maybe group by functionality tested
# rather than the socket level-ness of it.
import errno
import os
import os.path
import select
import shutil
import socket
import ssl
import tempfile
from collections import OrderedDict
from test import (
LONG_TIMEOUT,
SHORT_TIMEOUT,
... | isinstance(cm.value.reason, SSLError) | added | 27eba934303247b86b4df365ee021aa4cff02bdb0ba184f5f156a64ae1fc62a4 | assert|test_ssl_failed_fingerprint_verification|# TODO: Break this module up into pieces. Maybe group by functionality tested # rather than the socket level-ness of it. import errno import os import os.path import select import shutil import socket import ssl import tempfile from collections import OrderedDict from tes... | null | null | null |
urllib3/urllib3 | train | 529 | 34e11a22fb9357c5c52705bf508982cc471d96cb | train | test/with_dummyserver/test_socketlevel.py | train | urllib3/urllib3:test/with_dummyserver/test_socketlevel.py | 1,496 | 17 | pytest.raises | test_unknown_protocol | # TODO: Break this module up into pieces. Maybe group by functionality tested
# rather than the socket level-ness of it.
import errno
import os
import os.path
import select
import shutil
import socket
import ssl
import tempfile
from collections import OrderedDict
from test import (
LONG_TIMEOUT,
SHORT_TIMEOUT,
... | ProtocolError) | added | 166249c4c1bffae24b816aeec38a74390fcd62718852df7f8330d09e108ac92d | pytest.raises|test_unknown_protocol|# TODO: Break this module up into pieces. Maybe group by functionality tested # rather than the socket level-ness of it. import errno import os import os.path import select import shutil import socket import ssl import tempfile from collections import OrderedDict from test import ( L... | null | null | null |
urllib3/urllib3 | train | 530 | ca6672e1e325613066070c67db30d42d72734eb1 | train | dummyserver/testcase.py | train | urllib3/urllib3:dummyserver/testcase.py | 114 | 16 | assert | import socket
import threading
from contextlib import contextmanager
from typing import Any, Callable, ClassVar, Dict, Generator, Iterable, Optional
import pytest
from tornado import httpserver, ioloop, web
from dummyserver.handlers import TestingApp
from dummyserver.proxy import ProxyHandler
from dummyserver.server ... | expected_value_bytes | added | 6752ab4f4915c63b32a4c8227b1eee113f7ca18dd4029b3007514d532316bf78 | assert||import socket import threading from contextlib import contextmanager from typing import Any, Callable, ClassVar, Dict, Generator, Iterable, Optional import pytest from tornado import httpserver, ioloop, web from dummyserver.handlers import TestingApp from dummyserver.proxy import ProxyHandler from dummyserver.s... | null | null | null | |
urllib3/urllib3 | train | 530 | ca6672e1e325613066070c67db30d42d72734eb1 | train | dummyserver/testcase.py | train | urllib3/urllib3:dummyserver/testcase.py | 115 | 8 | assert | import socket
import threading
from contextlib import contextmanager
from typing import Any, Callable, ClassVar, Dict, Generator, Iterable, Optional
import pytest
from tornado import httpserver, ioloop, web
from dummyserver.handlers import TestingApp
from dummyserver.proxy import ProxyHandler
from dummyserver.server ... | header_titles | added | 86278f549ed8280aa3a584b385136ad30f9119c2bbf77fffaff94273e075b101 | assert||import socket import threading from contextlib import contextmanager from typing import Any, Callable, ClassVar, Dict, Generator, Iterable, Optional import pytest from tornado import httpserver, ioloop, web from dummyserver.handlers import TestingApp from dummyserver.proxy import ProxyHandler from dummyserver.s... | null | null | null | |
urllib3/urllib3 | train | 530 | ca6672e1e325613066070c67db30d42d72734eb1 | train | test/with_dummyserver/test_socketlevel.py | train | urllib3/urllib3:test/with_dummyserver/test_socketlevel.py | 363 | 13 | pytest.raises | test_load_keyfile_with_invalid_password | # TODO: Break this module up into pieces. Maybe group by functionality tested
# rather than the socket level-ness of it.
import errno
import os
import os.path
import select
import shutil
import socket
import ssl
import tempfile
from collections import OrderedDict
from pathlib import Path
from test import (
LONG_TIM... | expected_error) | added | 158e46bdcd4aaff0b44c69b2978c5ff042281ab2f3bdd4574429ef17f0ba1c28 | pytest.raises|test_load_keyfile_with_invalid_password|# TODO: Break this module up into pieces. Maybe group by functionality tested # rather than the socket level-ness of it. import errno import os import os.path import select import shutil import socket import ssl import tempfile from collections import OrderedDict fr... | null | null | null |
urllib3/urllib3 | train | 530 | ca6672e1e325613066070c67db30d42d72734eb1 | train | test/with_dummyserver/test_socketlevel.py | train | urllib3/urllib3:test/with_dummyserver/test_socketlevel.py | 787 | 12 | assert | test_connection_closed_on_read_timeout_preload_false | # TODO: Break this module up into pieces. Maybe group by functionality tested
# rather than the socket level-ness of it.
import errno
import os
import os.path
import select
import shutil
import socket
import ssl
import tempfile
from collections import OrderedDict
from pathlib import Path
from test import (
LONG_TIM... | rlist | added | 7158d4732eb42fde3f48c851614281f29edd070375d7412f91b01546079ce670 | assert|test_connection_closed_on_read_timeout_preload_false|# TODO: Break this module up into pieces. Maybe group by functionality tested # rather than the socket level-ness of it. import errno import os import os.path import select import shutil import socket import ssl import tempfile from collections import OrderedD... | null | null | null |
urllib3/urllib3 | train | 530 | ca6672e1e325613066070c67db30d42d72734eb1 | train | test/with_dummyserver/test_socketlevel.py | train | urllib3/urllib3:test/with_dummyserver/test_socketlevel.py | 1,448 | 13 | pytest.raises | test_load_verify_locations_exception | # TODO: Break this module up into pieces. Maybe group by functionality tested
# rather than the socket level-ness of it.
import errno
import os
import os.path
import select
import shutil
import socket
import ssl
import tempfile
from collections import OrderedDict
from pathlib import Path
from test import (
LONG_TIM... | SSLError) | added | 6e5909b7d5bdc0bba88e4c50e8646c291f805c1742ac4361bab16698ebafc761 | pytest.raises|test_load_verify_locations_exception|# TODO: Break this module up into pieces. Maybe group by functionality tested # rather than the socket level-ness of it. import errno import os import os.path import select import shutil import socket import ssl import tempfile from collections import OrderedDict from ... | null | null | null |
urllib3/urllib3 | train | 530 | ca6672e1e325613066070c67db30d42d72734eb1 | train | test/with_dummyserver/test_socketlevel.py | train | urllib3/urllib3:test/with_dummyserver/test_socketlevel.py | 1,721 | 12 | assert | test_chunked_head_response_does_not_hang | # TODO: Break this module up into pieces. Maybe group by functionality tested
# rather than the socket level-ness of it.
import errno
import os
import os.path
import select
import shutil
import socket
import ssl
import tempfile
from collections import OrderedDict
from pathlib import Path
from test import (
LONG_TIM... | list(r.stream()) | added | 703b9edbe9fe789af06a3652822b72a19156b8b43b29e4e8c2a7f3538fc8407a | assert|test_chunked_head_response_does_not_hang|# TODO: Break this module up into pieces. Maybe group by functionality tested # rather than the socket level-ness of it. import errno import os import os.path import select import shutil import socket import ssl import tempfile from collections import OrderedDict from pat... | null | null | null |
urllib3/urllib3 | train | 531 | 1939e4dc87b9382a4558c4a629aff46df040fb88 | train | test/test_util.py | train | urllib3/urllib3:test/test_util.py | 670 | 8 | assert | test_is_fp_closed_object_has_fp | import io
import logging
import socket
import ssl
import sys
import warnings
from itertools import chain
from test import ImportBlocker, ModuleStash, notBrotli, onlyBrotli
from typing import TYPE_CHECKING, Dict, Optional, Tuple, Union
from unittest import mock
from unittest.mock import MagicMock, Mock, patch
import py... | not is_fp_closed(FpFile()) | added | 492814574845ff5de1a43ba4afb0e32082693a2e0400b5240e6da9d8fb3de760 | assert|test_is_fp_closed_object_has_fp|import io import logging import socket import ssl import sys import warnings from itertools import chain from test import ImportBlocker, ModuleStash, notBrotli, onlyBrotli from typing import TYPE_CHECKING, Dict, Optional, Tuple, Union from unittest import mock from unittest.mock i... | null | null | null |
urllib3/urllib3 | train | 531 | 1939e4dc87b9382a4558c4a629aff46df040fb88 | train | test/test_util.py | train | urllib3/urllib3:test/test_util.py | 854 | 8 | assert | test_resolve_cert_reqs | import io
import logging
import socket
import ssl
import sys
import warnings
from itertools import chain
from test import ImportBlocker, ModuleStash, notBrotli, onlyBrotli
from typing import TYPE_CHECKING, Dict, Optional, Tuple, Union
from unittest import mock
from unittest.mock import MagicMock, Mock, patch
import py... | requirements | added | e834ce4bc51cd51943d36e9d7d3173b2fdfe485cbac0c2e2ad9e1a8c55ff8c7a | assert|test_resolve_cert_reqs|import io import logging import socket import ssl import sys import warnings from itertools import chain from test import ImportBlocker, ModuleStash, notBrotli, onlyBrotli from typing import TYPE_CHECKING, Dict, Optional, Tuple, Union from unittest import mock from unittest.mock import Mag... | null | null | null |
urllib3/urllib3 | train | 531 | 1939e4dc87b9382a4558c4a629aff46df040fb88 | train | test/test_util.py | train | urllib3/urllib3:test/test_util.py | 868 | 8 | assert | test_resolve_ssl_version | import io
import logging
import socket
import ssl
import sys
import warnings
from itertools import chain
from test import ImportBlocker, ModuleStash, notBrotli, onlyBrotli
from typing import TYPE_CHECKING, Dict, Optional, Tuple, Union
from unittest import mock
from unittest.mock import MagicMock, Mock, patch
import py... | version | added | c4122ae3b070bf82fd6bf71c134d45be91606fe7aeb68fcc554e69484efcd240 | assert|test_resolve_ssl_version|import io import logging import socket import ssl import sys import warnings from itertools import chain from test import ImportBlocker, ModuleStash, notBrotli, onlyBrotli from typing import TYPE_CHECKING, Dict, Optional, Tuple, Union from unittest import mock from unittest.mock import M... | null | null | null |
urllib3/urllib3 | train | 531 | 1939e4dc87b9382a4558c4a629aff46df040fb88 | train | test/test_util.py | train | urllib3/urllib3:test/test_util.py | 977 | 13 | pytest.raises | test_parse_url_without_idna | import io
import logging
import socket
import ssl
import sys
import warnings
from itertools import chain
from test import ImportBlocker, ModuleStash, notBrotli, onlyBrotli
from typing import TYPE_CHECKING, Dict, Optional, Tuple, Union
from unittest import mock
from unittest.mock import MagicMock, Mock, patch
import py... | LocationParseError, match=f"Failed to parse: {url}") | added | 401e2778dc47ec5702e8618bb96477c3eb691d6cb73025c5034d8a7d056502ee | pytest.raises|test_parse_url_without_idna|import io import logging import socket import ssl import sys import warnings from itertools import chain from test import ImportBlocker, ModuleStash, notBrotli, onlyBrotli from typing import TYPE_CHECKING, Dict, Optional, Tuple, Union from unittest import mock from unittest.moc... | null | null | null |
urllib3/urllib3 | train | 532 | 6eb2d55156350a0d21c1cde9769f6e094abe71e0 | train | test/contrib/test_pyopenssl.py | train | urllib3/urllib3:test/contrib/test_pyopenssl.py | 65 | 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 # type: ignore[import]
from urllib3.contrib.pyopenssl import _dnsname_to_stdlib, get_subj_alt_name
except ImportError:
pass
def setup_module() -> None:
... | expected_result | modified | 9f31f80028c1de7c56beaff9c5c1fd9b46dcbe51f8f81df10a38447809240095 | 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 # type: ignore[import] from urllib3.contrib.pyopenssl import _dnsname_to_stdlib, get_subj_alt_name except ImportError: pass def setup_module... | expected_result | 65 | 8 |
urllib3/urllib3 | train | 532 | 6eb2d55156350a0d21c1cde9769f6e094abe71e0 | train | test/contrib/test_pyopenssl.py | train | urllib3/urllib3:test/contrib/test_pyopenssl.py | 74 | 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 # type: ignore[import]
from urllib3.contrib.pyopenssl import _dnsname_to_stdlib, get_subj_alt_name
except ImportError:
pass
def setup_module() -> None:
... | expected_result | modified | f494b0e0692f7444b24025bdacba19cdc56dc60252afed425d43b82ff55315c9 | 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 # type: ignore[import] from urllib3.contrib.pyopenssl import _dnsname_to_stdlib, get_subj_alt_name except ImportError: pass def setu... | expected_result | 74 | 8 |
urllib3/urllib3 | train | 532 | 6eb2d55156350a0d21c1cde9769f6e094abe71e0 | train | test/contrib/test_pyopenssl.py | train | urllib3/urllib3:test/contrib/test_pyopenssl.py | 84 | 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 # type: ignore[import]
from urllib3.contrib.pyopenssl import _dnsname_to_stdlib, get_subj_alt_name
except ImportError:
pass
def setup_module() -> None:
... | expected_result | modified | 54b855fbf6756aeb5955421b2c0f86b9465eb9a56090a088663d5b26f719ede3 | 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 # type: ignore[import] from urllib3.contrib.pyopenssl import _dnsname_to_stdlib, get_subj_alt_name except ImportError: pass def setup... | expected_result | 84 | 8 |
urllib3/urllib3 | train | 532 | 6eb2d55156350a0d21c1cde9769f6e094abe71e0 | train | test/contrib/test_pyopenssl.py | train | urllib3/urllib3:test/contrib/test_pyopenssl.py | 99 | 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 # type: ignore[import]
from urllib3.contrib.pyopenssl import _dnsname_to_stdlib, get_subj_alt_name
except ImportError:
pass
def setup_module() -> None:
... | isinstance(mock_warning.call_args[0][1], x509.DuplicateExtension) | modified | 7570b5fd949e0f2c97125dfaa5960dfb7b871b9a78f9009d9f2bf6758fc0c31b | 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 # type: ignore[import] from urllib3.contrib.pyopenssl import _dnsname_to_stdlib, get_subj_alt_name except ImportError: pass def setup_module() -> N... | isinstance(mock_warning.call_args[0][1], x509.DuplicateExtension) | 99 | 8 |
urllib3/urllib3 | train | 533 | 40035162784a4b804ab7322134e5c650b4dc6cdb | train | test/contrib/test_securetransport.py | train | urllib3/urllib3:test/contrib/test_securetransport.py | 53 | 13 | pytest.raises | test_no_crash_with_empty_trust_bundle | import base64
import contextlib
import socket
import ssl
import pytest
try:
from urllib3.contrib.securetransport import WrappedSocket
except ImportError:
pass
def setup_module() -> None:
try:
from urllib3.contrib.securetransport import inject_into_urllib3
inject_into_urllib3()
excep... | ssl.SSLError) | modified | 0da4a05b5a1b88e0e394e3dec13ebd6a37b737f47a0b86ae33a9dd3042d3b02f | pytest.raises|test_no_crash_with_empty_trust_bundle|import base64 import contextlib import socket import ssl import pytest try: from urllib3.contrib.securetransport import WrappedSocket except ImportError: pass def setup_module() -> None: try: from urllib3.contrib.securetransport import inject_into_urllib3 inject_into_... | ssl.SSLError) | 53 | 13 |
urllib3/urllib3 | train | 533 | 40035162784a4b804ab7322134e5c650b4dc6cdb | train | test/contrib/test_securetransport.py | train | urllib3/urllib3:test/contrib/test_securetransport.py | 65 | 13 | pytest.raises | test_no_crash_with_invalid_trust_bundle | import base64
import contextlib
import socket
import ssl
import pytest
try:
from urllib3.contrib.securetransport import WrappedSocket
except ImportError:
pass
def setup_module() -> None:
try:
from urllib3.contrib.securetransport import inject_into_urllib3
inject_into_urllib3()
excep... | ssl.SSLError) | modified | b9ad548823972c21cede8ddd1100ec80887ea5ca395ca5329fc92dc50e41c197 | pytest.raises|test_no_crash_with_invalid_trust_bundle|import base64 import contextlib import socket import ssl import pytest try: from urllib3.contrib.securetransport import WrappedSocket except ImportError: pass def setup_module() -> None: try: from urllib3.contrib.securetransport import inject_into_urllib3 inject_int... | ssl.SSLError) | 65 | 13 |
urllib3/urllib3 | train | 534 | 327f871f5dc2dcb47d5a7eb17108fbafdabd3333 | train | test/test_util.py | train | urllib3/urllib3:test/test_util.py | 339 | 13 | pytest.raises | test_parse_url_negative_port | import io
import logging
import socket
import ssl
import sys
import warnings
from itertools import chain
from test import ImportBlocker, ModuleStash, notBrotli, onlyBrotli
from typing import TYPE_CHECKING, Dict, Optional, Tuple, Union
from unittest import mock
from unittest.mock import MagicMock, Mock, patch
import py... | LocationParseError) | added | 97626eb7db640c8abf0f3435a1452e0d794e2a33824109b6682c2d2f58f2c5d4 | pytest.raises|test_parse_url_negative_port|import io import logging import socket import ssl import sys import warnings from itertools import chain from test import ImportBlocker, ModuleStash, notBrotli, onlyBrotli from typing import TYPE_CHECKING, Dict, Optional, Tuple, Union from unittest import mock from unittest.mo... | null | null | null |
urllib3/urllib3 | train | 534 | 327f871f5dc2dcb47d5a7eb17108fbafdabd3333 | train | test/test_util.py | train | urllib3/urllib3:test/test_util.py | 373 | 8 | assert | test_netloc | import io
import logging
import socket
import ssl
import sys
import warnings
from itertools import chain
from test import ImportBlocker, ModuleStash, notBrotli, onlyBrotli
from typing import TYPE_CHECKING, Dict, Optional, Tuple, Union
from unittest import mock
from unittest.mock import MagicMock, Mock, patch
import py... | expected_netloc | added | 2d91bd58f1528cc602578ca626f23b0eb92da5d24f150e4b65368e7fa137a005 | assert|test_netloc|import io import logging import socket import ssl import sys import warnings from itertools import chain from test import ImportBlocker, ModuleStash, notBrotli, onlyBrotli from typing import TYPE_CHECKING, Dict, Optional, Tuple, Union from unittest import mock from unittest.mock import MagicMock, Moc... | null | null | null |
urllib3/urllib3 | train | 534 | 327f871f5dc2dcb47d5a7eb17108fbafdabd3333 | train | test/test_util.py | train | urllib3/urllib3:test/test_util.py | 709 | 12 | assert | test_ip_family_ipv6_disabled | import io
import logging
import socket
import ssl
import sys
import warnings
from itertools import chain
from test import ImportBlocker, ModuleStash, notBrotli, onlyBrotli
from typing import TYPE_CHECKING, Dict, Optional, Tuple, Union
from unittest import mock
from unittest.mock import MagicMock, Mock, patch
import py... | socket.AF_INET | added | 9f9cfcc8a7bed407a2497b8de14d95eb898199867403af5b3bc83684fa5ca003 | assert|test_ip_family_ipv6_disabled|import io import logging import socket import ssl import sys import warnings from itertools import chain from test import ImportBlocker, ModuleStash, notBrotli, onlyBrotli from typing import TYPE_CHECKING, Dict, Optional, Tuple, Union from unittest import mock from unittest.mock impo... | null | null | null |
urllib3/urllib3 | train | 534 | 327f871f5dc2dcb47d5a7eb17108fbafdabd3333 | train | test/test_util.py | train | urllib3/urllib3:test/test_util.py | 987 | 8 | assert | test_is_has_never_check_common_name_reliable | import io
import logging
import socket
import ssl
import sys
import warnings
from itertools import chain
from test import ImportBlocker, ModuleStash, notBrotli, onlyBrotli
from typing import TYPE_CHECKING, Dict, Optional, Tuple, Union
from unittest import mock
from unittest.mock import MagicMock, Mock, patch
import py... | reliable | added | f0ab5781801d20375b1598ca332eba12daa492dd30df91e9e9b9b3fab0ad5e74 | assert|test_is_has_never_check_common_name_reliable|import io import logging import socket import ssl import sys import warnings from itertools import chain from test import ImportBlocker, ModuleStash, notBrotli, onlyBrotli from typing import TYPE_CHECKING, Dict, Optional, Tuple, Union from unittest import mock from un... | null | null | null |
urllib3/urllib3 | train | 534 | 327f871f5dc2dcb47d5a7eb17108fbafdabd3333 | train | test/with_dummyserver/test_https.py | train | urllib3/urllib3:test/with_dummyserver/test_https.py | 981 | 17 | pytest.raises | test_common_name_without_san_fails | import datetime
import logging
import os.path
import shutil
import ssl
import sys
import tempfile
import warnings
from pathlib import Path
from test import (
LONG_TIMEOUT,
SHORT_TIMEOUT,
TARPIT_HOST,
notSecureTransport,
requires_network,
requires_ssl_context_keyfile_password,
resolvesLocalho... | MaxRetryError) | modified | 9dcdb6753e4995497a6de44a0502086a32c9c9b2f6a9f478de28202449d7f3d9 | pytest.raises|test_common_name_without_san_fails|import datetime import logging import os.path import shutil import ssl import sys import tempfile import warnings from pathlib import Path from test import ( LONG_TIMEOUT, SHORT_TIMEOUT, TARPIT_HOST, notSecureTransport, requires_network, requires_ssl_context_keyfile_pass... | MaxRetryError, match="no appropriate subjectAltName") | 981 | 17 |
urllib3/urllib3 | train | 534 | 327f871f5dc2dcb47d5a7eb17108fbafdabd3333 | train | test/with_dummyserver/test_https.py | train | urllib3/urllib3:test/with_dummyserver/test_https.py | 985 | 12 | assert | test_common_name_without_san_fails | import datetime
import logging
import os.path
import shutil
import ssl
import sys
import tempfile
import warnings
from pathlib import Path
from test import (
LONG_TIMEOUT,
SHORT_TIMEOUT,
TARPIT_HOST,
notSecureTransport,
requires_network,
requires_ssl_context_keyfile_password,
resolvesLocalho... | "mismatch, certificate is not valid" in str( e.value ) or "no appropriate subjectAltName" in str(e.value) | added | b26f22fcee4361b466d7cfef5ed1cba5d4b80e093d0457dae2ef4c69fc2d0f49 | assert|test_common_name_without_san_fails|import datetime import logging import os.path import shutil import ssl import sys import tempfile import warnings from pathlib import Path from test import ( LONG_TIMEOUT, SHORT_TIMEOUT, TARPIT_HOST, notSecureTransport, requires_network, requires_ssl_context_keyfile_password, r... | null | null | null |
urllib3/urllib3 | train | 535 | 74abd449be7925dfb5d19b74d609df70d3af6fc1 | train | dummyserver/testcase.py | train | urllib3/urllib3:dummyserver/testcase.py | 29 | 8 | assert | import socket
import ssl
import threading
from contextlib import contextmanager
from typing import Any, Callable, ClassVar, Dict, Generator, Iterable, Optional, Union
import pytest
from tornado import httpserver, ioloop, web
from dummyserver.handlers import TestingApp
from dummyserver.proxy import ProxyHandler
from d... | isinstance(b, bytes) | added | cad3dabcb86f46f3c0908b5208f35c165f7b92ee727a99ef6f7a74a0dba59c20 | assert||import socket import ssl import threading from contextlib import contextmanager from typing import Any, Callable, ClassVar, Dict, Generator, Iterable, Optional, Union import pytest from tornado import httpserver, ioloop, web from dummyserver.handlers import TestingApp from dummyserver.proxy import ProxyHandler ... | null | null | null | |
urllib3/urllib3 | train | 535 | 74abd449be7925dfb5d19b74d609df70d3af6fc1 | train | dummyserver/testcase.py | train | urllib3/urllib3:dummyserver/testcase.py | 124 | 16 | assert | import socket
import ssl
import threading
from contextlib import contextmanager
from typing import Any, Callable, ClassVar, Dict, Generator, Iterable, Optional, Union
import pytest
from tornado import httpserver, ioloop, web
from dummyserver.handlers import TestingApp
from dummyserver.proxy import ProxyHandler
from d... | expected_value_bytes | added | 6f69fc3cb2de83947510232730d6280eb68bd9358ca08ea90a84954079131229 | assert||import socket import ssl import threading from contextlib import contextmanager from typing import Any, Callable, ClassVar, Dict, Generator, Iterable, Optional, Union import pytest from tornado import httpserver, ioloop, web from dummyserver.handlers import TestingApp from dummyserver.proxy import ProxyHandler ... | null | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.