From c7e67446a3054998893d64cbab150810d2a99aa5 Mon Sep 17 00:00:00 2001 From: Andrey Zelenkov Date: Wed, 21 Mar 2018 18:26:40 +0300 Subject: Tests: Ruby module. --- test/test_python_application.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'test/test_python_application.py') diff --git a/test/test_python_application.py b/test/test_python_application.py index 3090cb2a..1a6f4a1e 100644 --- a/test/test_python_application.py +++ b/test/test_python_application.py @@ -1,4 +1,3 @@ -import time import unittest import unit @@ -22,9 +21,8 @@ class TestUnitPythonApplication(unit.TestUnitApplicationPython): 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.assertLess(abs(self.date_to_sec_epoch(headers.pop('Date')) - + self.sec_epoch()), 5, 'date header') self.assertDictEqual(headers, { 'Content-Length': str(len(body)), 'Content-Type': 'text/html', -- cgit