diff --git a/api_specification.md b/api_specification.md index 883dcf838ad6dcc77e4589c8837b1189f3a2ca8f..fe095fef61dfd7649aa878153117d3e804b39cef 100644 --- a/api_specification.md +++ b/api_specification.md @@ -58,8 +58,6 @@ The current site status can be retrieved with `GET /status`. It can be in three * 'This may be used while the site is [read-only](#site-status).' * `unavailable`: The site is unavailable and the only route you can call is `GET /status` -### Miscellaneous - --- #### `GET /status` @@ -110,6 +108,8 @@ Returns `200 OK` if the site is ready to answer requests, otherwise `503 SERVICE --- +### Miscellaneous + #### `GET /homepage` This may be used while the site is [read-only](#site-status). diff --git a/tests/routes/site.py b/tests/routes/site.py index 10f1bec4adc4715ed470bf5fd5d706b14c90f2a9..90b437eb51a540ac981bc37b1cae1c818f246306 100644 --- a/tests/routes/site.py +++ b/tests/routes/site.py @@ -4,24 +4,28 @@ from object_data import * class SiteTest(ApiTest): - def test_announcements(self): + def test_status(self): + # TODO test live config self.do_json_request( "GET", - "/announcements", + "/status", None, { + "status": "available", "announcements": [ TEST_DATA_ANNOUNCEMENT_1, TEST_DATA_ANNOUNCEMENT_2 ] }, - ["announcements"] + ignore_array_order_keys=["announcements"], + ignore_value_keys=["is_debug"] ) self.do_json_request( "GET", - "/announcements", + "/status", None, { + "status": "available", "announcements": [ TEST_DATA_ANNOUNCEMENT_1_MOD, TEST_DATA_ANNOUNCEMENT_2_MOD, @@ -30,7 +34,8 @@ class SiteTest(ApiTest): TEST_DATA_ANNOUNCEMENT_5_MOD ] }, - ["announcements"], + ignore_array_order_keys=["announcements"], + ignore_value_keys=["is_debug"], use_moderator_login=True )