test_text_response() — requests Function Reference
Architecture documentation for the test_text_response() function in test_testserver.py from the requests codebase.
Entity Profile
Dependency Diagram
graph TD 762416f7_7463_06ad_e8f9_cba074219bb4["test_text_response()"] ba85c801_ef4e_5a92_0e3d_07f791306eaf["TestTestServer"] 762416f7_7463_06ad_e8f9_cba074219bb4 -->|defined in| ba85c801_ef4e_5a92_0e3d_07f791306eaf 507b0f59_b4bd_1c2b_f879_58d253933ec3["text_response_server()"] 762416f7_7463_06ad_e8f9_cba074219bb4 -->|calls| 507b0f59_b4bd_1c2b_f879_58d253933ec3 style 762416f7_7463_06ad_e8f9_cba074219bb4 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
tests/test_testserver.py lines 42–53
def test_text_response(self):
"""the text_response_server sends the given text"""
server = Server.text_response_server(
"HTTP/1.1 200 OK\r\nContent-Length: 6\r\n\r\nroflol"
)
with server as (host, port):
r = requests.get(f"http://{host}:{port}")
assert r.status_code == 200
assert r.text == "roflol"
assert r.headers["Content-Length"] == "6"
Domain
Subdomains
Defined In
Calls
Source
Frequently Asked Questions
What does test_text_response() do?
test_text_response() is a function in the requests codebase, defined in tests/test_testserver.py.
Where is test_text_response() defined?
test_text_response() is defined in tests/test_testserver.py at line 42.
What does test_text_response() call?
test_text_response() calls 1 function(s): text_response_server.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free