test_links() — requests Function Reference
Architecture documentation for the test_links() function in test_requests.py from the requests codebase.
Entity Profile
Dependency Diagram
graph TD 994a8812_e3d0_eda5_91bb_3d5e130744fe["test_links()"] 22b80b19_26d4_cd0e_c476_3edf87b3df14["TestRequests"] 994a8812_e3d0_eda5_91bb_3d5e130744fe -->|defined in| 22b80b19_26d4_cd0e_c476_3edf87b3df14 style 994a8812_e3d0_eda5_91bb_3d5e130744fe fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
tests/test_requests.py lines 1238–1262
def test_links(self):
r = requests.Response()
r.headers = {
"cache-control": "public, max-age=60, s-maxage=60",
"connection": "keep-alive",
"content-encoding": "gzip",
"content-type": "application/json; charset=utf-8",
"date": "Sat, 26 Jan 2013 16:47:56 GMT",
"etag": '"6ff6a73c0e446c1f61614769e3ceb778"',
"last-modified": "Sat, 26 Jan 2013 16:22:39 GMT",
"link": (
"<https://api.github.com/users/kennethreitz/repos?"
'page=2&per_page=10>; rel="next", <https://api.github.'
"com/users/kennethreitz/repos?page=7&per_page=10>; "
' rel="last"'
),
"server": "GitHub.com",
"status": "200 OK",
"vary": "Accept",
"x-content-type-options": "nosniff",
"x-github-media-type": "github.beta",
"x-ratelimit-limit": "60",
"x-ratelimit-remaining": "57",
}
assert r.links["next"]["rel"] == "next"
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does test_links() do?
test_links() is a function in the requests codebase, defined in tests/test_requests.py.
Where is test_links() defined?
test_links() is defined in tests/test_requests.py at line 1238.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free