summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorChristian Struck <christian@struck.se>2013-02-04 21:16:12 +0100
committerChristian Struck <christian@struck.se>2013-02-04 21:16:12 +0100
commit1ede09d2c27066f161e65aec0a309c9cdc32a54b (patch)
tree14ae6defb41af13b8abad77059f2ca486d426b9f /tests
parente1981063359b0910614e5ea3f861a5ce1e54970d (diff)
downloadbvg-grabber-1ede09d2c27066f161e65aec0a309c9cdc32a54b.tar.gz
bvg-grabber-1ede09d2c27066f161e65aec0a309c9cdc32a54b.tar.bz2
bvg-grabber-1ede09d2c27066f161e65aec0a309c9cdc32a54b.zip
made Response object json serializable reworked tests and removed to_json from departure object
Diffstat (limited to 'tests')
-rw-r--r--tests/test_api.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/test_api.py b/tests/test_api.py
index 113bbbf..8487bd2 100644
--- a/tests/test_api.py
+++ b/tests/test_api.py
@@ -61,9 +61,10 @@ class TestResponse(unittest.TestCase):
"ERP",
datetime.datetime(2013, 2, 1, 3, 4, 1),
"U9")]
- allDepartures = departures + departures2
- r1 = Response(True, departures)
- r2 = Response(True, departures2)
+ allDepartures = [("Marchbrücke", departures),
+ ("S Tiergarten", departures2)]
+ r1 = Response(True, "Marchbrücke", departures)
+ r2 = Response(True, "S Tiergarten", departures2)
r3 = Response(False, [])
self.assertRaises(ValueError, r1.merge, r3)
self.assertRaises(ValueError, r3.merge, r2)
@@ -205,7 +206,7 @@ class TestDeparture(BaseTestDeparture):
self.assertRaises(TypeError, Departure, "from", "to", ["when"], "line")
self.assertIsInstance(Departure("from", "to", "16:15\n \t*", "line"),
Departure)
-
+ @unittest.skip("removed json from object")
def test_json(self):
json1 = {'start': "From My Station",
'end': "To Your Station",