test_prepared_request_with_file_is_pickleable() — requests Function Reference
Architecture documentation for the test_prepared_request_with_file_is_pickleable() function in test_requests.py from the requests codebase.
Entity Profile
Dependency Diagram
graph TD 7ad498bb_aaaf_84a7_40ee_635f3a37ec36["test_prepared_request_with_file_is_pickleable()"] 22b80b19_26d4_cd0e_c476_3edf87b3df14["TestRequests"] 7ad498bb_aaaf_84a7_40ee_635f3a37ec36 -->|defined in| 22b80b19_26d4_cd0e_c476_3edf87b3df14 772251a3_91b5_d6a8_857f_bb938ed045f7["send()"] 7ad498bb_aaaf_84a7_40ee_635f3a37ec36 -->|calls| 772251a3_91b5_d6a8_857f_bb938ed045f7 style 7ad498bb_aaaf_84a7_40ee_635f3a37ec36 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
tests/test_requests.py lines 1538–1552
def test_prepared_request_with_file_is_pickleable(self, httpbin):
with open(__file__, "rb") as f:
r = requests.Request("POST", httpbin("post"), files={"file": f})
p = r.prepare()
# Verify PreparedRequest can be pickled and unpickled
r = pickle.loads(pickle.dumps(p))
assert r.url == p.url
assert r.headers == p.headers
assert r.body == p.body
# Verify unpickled PreparedRequest sends properly
s = requests.Session()
resp = s.send(r)
assert resp.status_code == 200
Domain
Subdomains
Defined In
Calls
Source
Frequently Asked Questions
What does test_prepared_request_with_file_is_pickleable() do?
test_prepared_request_with_file_is_pickleable() is a function in the requests codebase, defined in tests/test_requests.py.
Where is test_prepared_request_with_file_is_pickleable() defined?
test_prepared_request_with_file_is_pickleable() is defined in tests/test_requests.py at line 1538.
What does test_prepared_request_with_file_is_pickleable() call?
test_prepared_request_with_file_is_pickleable() 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