diff options
author | Markus Holtermann <info@markusholtermann.eu> | 2013-01-24 23:39:54 +0100 |
---|---|---|
committer | Markus Holtermann <info@markusholtermann.eu> | 2013-01-24 23:39:54 +0100 |
commit | f1336d76dd4a65cba979afdabbafeb18c2a14e03 (patch) | |
tree | d902687d08ae11a9959c3877ea6411c27bb0ee06 /tests | |
parent | 44c7a2575d2363c4b45f389a0bb2251e2f2f6685 (diff) | |
download | bvg-grabber-f1336d76dd4a65cba979afdabbafeb18c2a14e03.tar.gz bvg-grabber-f1336d76dd4a65cba979afdabbafeb18c2a14e03.tar.bz2 bvg-grabber-f1336d76dd4a65cba979afdabbafeb18c2a14e03.zip |
Partial revert auf recent cleanup to make the tests run on Python 3.2 again
Diffstat (limited to 'tests')
-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) |