MCPcopy
hub / github.com/psf/requests / test_max_age_valid_int

Method test_max_age_valid_int

tests/test_requests.py:2493–2499  ·  view source on GitHub ↗

Test case where a valid max age in seconds is passed.

(self)

Source from the content-addressed store, hash-verified

2491 """Tests for morsel_to_cookie when morsel contains max-age."""
2492
2493 def test_max_age_valid_int(self):
2494 """Test case where a valid max age in seconds is passed."""
2495
2496 morsel = Morsel()
2497 morsel["max-age"] = 60
2498 cookie = morsel_to_cookie(morsel)
2499 assert isinstance(cookie.expires, int)
2500
2501 def test_max_age_invalid_str(self):
2502 """Test case where a invalid max age is passed."""

Callers

nothing calls this directly

Calls 1

morsel_to_cookieFunction · 0.90

Tested by

no test coverage detected