diff options
Diffstat (limited to '')
-rw-r--r-- | test/test_python_application.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/test_python_application.py b/test/test_python_application.py index e5f1d02c..5f9debb8 100644 --- a/test/test_python_application.py +++ b/test/test_python_application.py @@ -1,3 +1,4 @@ +import time import unittest import unit @@ -62,6 +63,9 @@ def application(environ, start_response): headers = resp['headers'] self.assertRegex(headers.pop('Server'), r'unit/[\d\.]+', 'server header') + self.assertLess(abs(time.mktime(time.gmtime()) - + time.mktime(time.strptime(headers.pop('Date'), + '%a, %d %b %Y %H:%M:%S GMT'))), 5, 'date header') self.assertDictEqual(headers, { 'Content-Length': str(len(body)), 'Content-Type': 'text/html', |