test_rewind_body() — requests Function Reference
Architecture documentation for the test_rewind_body() function in test_requests.py from the requests codebase.
Entity Profile
Dependency Diagram
graph TD c5eae63c_cf8c_63d3_a472_2483880a618a["test_rewind_body()"] 22b80b19_26d4_cd0e_c476_3edf87b3df14["TestRequests"] c5eae63c_cf8c_63d3_a472_2483880a618a -->|defined in| 22b80b19_26d4_cd0e_c476_3edf87b3df14 e661d358_be18_74b3_7f2e_30e0b47b69b3["read()"] c5eae63c_cf8c_63d3_a472_2483880a618a -->|calls| e661d358_be18_74b3_7f2e_30e0b47b69b3 style c5eae63c_cf8c_63d3_a472_2483880a618a fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
tests/test_requests.py lines 1973–1984
def test_rewind_body(self):
data = io.BytesIO(b"the data")
prep = requests.Request("GET", "http://example.com", data=data).prepare()
assert prep._body_position == 0
assert prep.body.read() == b"the data"
# the data has all been read
assert prep.body.read() == b""
# rewind it back
requests.utils.rewind_body(prep)
assert prep.body.read() == b"the data"
Domain
Subdomains
Defined In
Calls
Source
Frequently Asked Questions
What does test_rewind_body() do?
test_rewind_body() is a function in the requests codebase, defined in tests/test_requests.py.
Where is test_rewind_body() defined?
test_rewind_body() is defined in tests/test_requests.py at line 1973.
What does test_rewind_body() call?
test_rewind_body() calls 1 function(s): read.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free