TestMorselToCookieMaxAge Class — requests Architecture
Architecture documentation for the TestMorselToCookieMaxAge class in test_requests.py from the requests codebase.
Entity Profile
Dependency Diagram
graph TD a240c965_a4cb_2b4c_25b0_a30cd0a4c80d["TestMorselToCookieMaxAge"] 69ebfd6f_8f0c_4586_0c19_2c348e1a42a2["test_requests.py"] a240c965_a4cb_2b4c_25b0_a30cd0a4c80d -->|defined in| 69ebfd6f_8f0c_4586_0c19_2c348e1a42a2 bcfbb9a3_f723_24dd_5127_1fa61b93e8f7["test_max_age_valid_int()"] a240c965_a4cb_2b4c_25b0_a30cd0a4c80d -->|method| bcfbb9a3_f723_24dd_5127_1fa61b93e8f7 aa19aa21_f21a_279d_9eb1_d110351c7e51["test_max_age_invalid_str()"] a240c965_a4cb_2b4c_25b0_a30cd0a4c80d -->|method| aa19aa21_f21a_279d_9eb1_d110351c7e51
Relationship Graph
Source Code
tests/test_requests.py lines 2462–2479
class TestMorselToCookieMaxAge:
"""Tests for morsel_to_cookie when morsel contains max-age."""
def test_max_age_valid_int(self):
"""Test case where a valid max age in seconds is passed."""
morsel = Morsel()
morsel["max-age"] = 60
cookie = morsel_to_cookie(morsel)
assert isinstance(cookie.expires, int)
def test_max_age_invalid_str(self):
"""Test case where a invalid max age is passed."""
morsel = Morsel()
morsel["max-age"] = "woops"
with pytest.raises(TypeError):
morsel_to_cookie(morsel)
Domain
Defined In
Source
Frequently Asked Questions
What is the TestMorselToCookieMaxAge class?
TestMorselToCookieMaxAge is a class in the requests codebase, defined in tests/test_requests.py.
Where is TestMorselToCookieMaxAge defined?
TestMorselToCookieMaxAge is defined in tests/test_requests.py at line 2462.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free