From b9faf84b245a39780373545f778586bcc9ace916 Mon Sep 17 00:00:00 2001 From: John Chilton Date: Tue, 5 Jan 2016 00:07:57 +0000 Subject: [PATCH] Stub an API test for tours so I can refactor a little. --- test/api/test_tours.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 test/api/test_tours.py diff --git a/test/api/test_tours.py b/test/api/test_tours.py new file mode 100644 index 00000000000..9e94a433d0f --- /dev/null +++ b/test/api/test_tours.py @@ -0,0 +1,17 @@ +from base import api + + +class TourApiTestCase( api.ApiTestCase ): + + def test_index(self): + response = self._get( "tours" ) + self._assert_status_code_is( response, 200 ) + tours = response.json() + tour_keys = map(lambda t: t["id"], tours) + assert "core.history" in tour_keys + + def test_show(self): + response = self._get( "tours/core.history" ) + self._assert_status_code_is( response, 200 ) + tour = response.json() + self._assert_has_keys(tour, "name", "description", "title_default", "steps")