From 1ede09d2c27066f161e65aec0a309c9cdc32a54b Mon Sep 17 00:00:00 2001 From: Christian Struck Date: Mon, 4 Feb 2013 21:16:12 +0100 Subject: made Response object json serializable reworked tests and removed to_json from departure object --- tests/test_api.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'tests') 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", -- cgit v1.2.3