diff options
author | Markus Holtermann <info@markusholtermann.eu> | 2013-01-24 23:34:04 +0100 |
---|---|---|
committer | Markus Holtermann <info@markusholtermann.eu> | 2013-01-24 23:34:04 +0100 |
commit | 3db48dfd834531d8d66751dfc7ff7bd289f2ef0d (patch) | |
tree | c31fd9aa46a6b7de0ce2e3f526224b48dc979a4f /tests | |
parent | 324c61e220fcb66973007cab4b95ca249aef3274 (diff) | |
download | bvg-grabber-3db48dfd834531d8d66751dfc7ff7bd289f2ef0d.tar.gz bvg-grabber-3db48dfd834531d8d66751dfc7ff7bd289f2ef0d.tar.bz2 bvg-grabber-3db48dfd834531d8d66751dfc7ff7bd289f2ef0d.zip |
Cleanup
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) |