diff options
Diffstat (limited to 'tests/responses')
| -rw-r--r-- | tests/responses/test_cookie.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/responses/test_cookie.py b/tests/responses/test_cookie.py index b37c6fb7b6..3a57dcfe45 100644 --- a/tests/responses/test_cookie.py +++ b/tests/responses/test_cookie.py @@ -71,6 +71,11 @@ class SetCookieTests(SimpleTestCase): response.set_cookie("max_age", max_age=10.6) self.assertEqual(response.cookies["max_age"]["max-age"], 10) + def test_max_age_timedelta(self): + response = HttpResponse() + response.set_cookie("max_age", max_age=timedelta(hours=1)) + self.assertEqual(response.cookies["max_age"]["max-age"], 3600) + def test_httponly_cookie(self): response = HttpResponse() response.set_cookie("example", httponly=True) |
