summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMarkus Holtermann <info@markusholtermann.eu>2013-01-24 23:39:54 +0100
committerMarkus Holtermann <info@markusholtermann.eu>2013-01-24 23:39:54 +0100
commitf1336d76dd4a65cba979afdabbafeb18c2a14e03 (patch)
treed902687d08ae11a9959c3877ea6411c27bb0ee06 /tests
parent44c7a2575d2363c4b45f389a0bb2251e2f2f6685 (diff)
downloadbvg-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.py5
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)