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