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

Method test_expires_valid_str

tests/test_requests.py:2459–2465  ·  view source on GitHub ↗

Test case where we convert expires from string time.

(self)

Source from the content-addressed store, hash-verified

2457 """Tests for morsel_to_cookie when morsel contains expires."""
2458
2459 def test_expires_valid_str(self):
2460 """Test case where we convert expires from string time."""
2461
2462 morsel = Morsel()
2463 morsel["expires"] = "Thu, 01-Jan-1970 00:00:01 GMT"
2464 cookie = morsel_to_cookie(morsel)
2465 assert cookie.expires == 1
2466
2467 @pytest.mark.parametrize(
2468 "value, exception",

Callers

nothing calls this directly

Calls 1

morsel_to_cookieFunction · 0.90

Tested by

no test coverage detected