test_request_recovery() — requests Function Reference
Architecture documentation for the test_request_recovery() function in test_testserver.py from the requests codebase.
Entity Profile
Dependency Diagram
graph TD c1765a3d_a7ab_9909_31bc_bebe7315e225["test_request_recovery()"] ba85c801_ef4e_5a92_0e3d_07f791306eaf["TestTestServer"] c1765a3d_a7ab_9909_31bc_bebe7315e225 -->|defined in| ba85c801_ef4e_5a92_0e3d_07f791306eaf 77b5091f_26f5_443a_fd8b_425cdd5ca984["basic_response_server()"] c1765a3d_a7ab_9909_31bc_bebe7315e225 -->|calls| 77b5091f_26f5_443a_fd8b_425cdd5ca984 style c1765a3d_a7ab_9909_31bc_bebe7315e225 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
tests/test_testserver.py lines 95–115
def test_request_recovery(self):
"""can check the requests content"""
# TODO: figure out why this sometimes fails when using pytest-xdist.
server = Server.basic_response_server(requests_to_handle=2)
first_request = b"put your hands up in the air"
second_request = b"put your hand down in the floor"
with server as address:
sock1 = socket.socket()
sock2 = socket.socket()
sock1.connect(address)
sock1.sendall(first_request)
sock1.close()
sock2.connect(address)
sock2.sendall(second_request)
sock2.close()
assert server.handler_results[0] == first_request
assert server.handler_results[1] == second_request
Domain
Subdomains
Defined In
Calls
Source
Frequently Asked Questions
What does test_request_recovery() do?
test_request_recovery() is a function in the requests codebase, defined in tests/test_testserver.py.
Where is test_request_recovery() defined?
test_request_recovery() is defined in tests/test_testserver.py at line 95.
What does test_request_recovery() call?
test_request_recovery() 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