Home / Function/ test_multiple_requests() — requests Function Reference

test_multiple_requests() — requests Function Reference

Architecture documentation for the test_multiple_requests() function in test_testserver.py from the requests codebase.

Entity Profile

Dependency Diagram

graph TD
  ae06816e_1ae0_467c_b481_c7aab860c248["test_multiple_requests()"]
  ba85c801_ef4e_5a92_0e3d_07f791306eaf["TestTestServer"]
  ae06816e_1ae0_467c_b481_c7aab860c248 -->|defined in| ba85c801_ef4e_5a92_0e3d_07f791306eaf
  77b5091f_26f5_443a_fd8b_425cdd5ca984["basic_response_server()"]
  ae06816e_1ae0_467c_b481_c7aab860c248 -->|calls| 77b5091f_26f5_443a_fd8b_425cdd5ca984
  style ae06816e_1ae0_467c_b481_c7aab860c248 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

tests/test_testserver.py lines 78–92

    def test_multiple_requests(self):
        """multiple requests can be served"""
        requests_to_handle = 5

        server = Server.basic_response_server(requests_to_handle=requests_to_handle)

        with server as (host, port):
            server_url = f"http://{host}:{port}"
            for _ in range(requests_to_handle):
                r = requests.get(server_url)
                assert r.status_code == 200

            # the (n+1)th request fails
            with pytest.raises(requests.exceptions.ConnectionError):
                r = requests.get(server_url)

Domain

Subdomains

Frequently Asked Questions

What does test_multiple_requests() do?
test_multiple_requests() is a function in the requests codebase, defined in tests/test_testserver.py.
Where is test_multiple_requests() defined?
test_multiple_requests() is defined in tests/test_testserver.py at line 78.
What does test_multiple_requests() call?
test_multiple_requests() calls 1 function(s): basic_response_server.

Analyze Your Own Codebase

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

Try Supermodel Free