diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_api.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/test_api.py b/tests/test_api.py index dafe598..885846b 100644 --- a/tests/test_api.py +++ b/tests/test_api.py @@ -1,6 +1,4 @@ # -*- coding: utf-8 -*- - -import time import unittest from datetime import datetime @@ -18,7 +16,9 @@ class TestQueryApi(unittest.TestCase): class TestDeparture(unittest.TestCase): def test_timestamp_futur(self): - when = time.time() + 10 * 60 + when = datetime.now() + when = when.replace(minute=when.minute + 10) + when = when.timestamp() dep = Departure("from", "to", when, "line") self.assertLessEqual(dep.remaining().total_seconds(), 600) self.assertGreaterEqual(dep.remaining().total_seconds(), 590) |