Home / Function/ test_different_connection_pool_for_tls_settings_verify_True() — requests Function Reference

test_different_connection_pool_for_tls_settings_verify_True() — requests Function Reference

Architecture documentation for the test_different_connection_pool_for_tls_settings_verify_True() function in test_requests.py from the requests codebase.

Entity Profile

Dependency Diagram

graph TD
  52891849_9721_8d84_aae9_58b8ae0c7cd5["test_different_connection_pool_for_tls_settings_verify_True()"]
  0e391504_f528_a095_5b1a_95d479a82586["TestPreparingURLs"]
  52891849_9721_8d84_aae9_58b8ae0c7cd5 -->|defined in| 0e391504_f528_a095_5b1a_95d479a82586
  772251a3_91b5_d6a8_857f_bb938ed045f7["send()"]
  52891849_9721_8d84_aae9_58b8ae0c7cd5 -->|calls| 772251a3_91b5_d6a8_857f_bb938ed045f7
  style 52891849_9721_8d84_aae9_58b8ae0c7cd5 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

tests/test_requests.py lines 2873–2902

    def test_different_connection_pool_for_tls_settings_verify_True(self):
        def response_handler(sock):
            consume_socket_content(sock, timeout=0.5)
            sock.send(
                b"HTTP/1.1 200 OK\r\n"
                b"Content-Length: 18\r\n\r\n"
                b'\xff\xfe{\x00"\x00K0"\x00=\x00"\x00\xab0"\x00\r\n'
            )

        s = requests.Session()
        close_server = threading.Event()
        server = TLSServer(
            handler=response_handler,
            wait_to_close_event=close_server,
            requests_to_handle=3,
            cert_chain="tests/certs/expired/server/server.pem",
            keyfile="tests/certs/expired/server/server.key",
        )

        with server as (host, port):
            url = f"https://{host}:{port}"
            r1 = s.get(url, verify=False)
            assert r1.status_code == 200

            # Cannot verify self-signed certificate
            with pytest.raises(requests.exceptions.SSLError):
                s.get(url)

            close_server.set()
        assert 2 == len(s.adapters["https://"].poolmanager.pools)

Domain

Subdomains

Calls

Frequently Asked Questions

What does test_different_connection_pool_for_tls_settings_verify_True() do?
test_different_connection_pool_for_tls_settings_verify_True() is a function in the requests codebase, defined in tests/test_requests.py.
Where is test_different_connection_pool_for_tls_settings_verify_True() defined?
test_different_connection_pool_for_tls_settings_verify_True() is defined in tests/test_requests.py at line 2873.
What does test_different_connection_pool_for_tls_settings_verify_True() call?
test_different_connection_pool_for_tls_settings_verify_True() calls 1 function(s): send.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free