summaryrefslogtreecommitdiff
path: root/test/test_environ.py
diff options
context:
space:
mode:
authorMarcel Hellkamp <marc@gsites.de>2013-06-04 01:09:52 +0200
committerMarcel Hellkamp <marc@gsites.de>2013-06-04 01:09:52 +0200
commit54a82e4ef4924268685ed5844935aaac7647015b (patch)
tree56682841224d0708be979d7e3aa93b708b448fff /test/test_environ.py
parent20f605aec9e6c517d0d7b8e34926cbc950197ac8 (diff)
downloadbottle-54a82e4ef4924268685ed5844935aaac7647015b.tar.gz
Added BaseResponse::expires tests.
Diffstat (limited to 'test/test_environ.py')
-rwxr-xr-xtest/test_environ.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/test/test_environ.py b/test/test_environ.py
index 4153e17..a1369dc 100755
--- a/test/test_environ.py
+++ b/test/test_environ.py
@@ -625,7 +625,12 @@ class TestResponse(unittest.TestCase):
response['x-test'] = None
self.assertEqual('None', response['x-test'])
-
+ def test_expires_header(self):
+ import datetime
+ response = BaseResponse()
+ now = datetime.datetime.now()
+ response.expires = now
+ self.assertEqual(0, int((response.expires-now).total_seconds()))
class TestRedirect(unittest.TestCase):