diff options
author | 2018-03-04 16:33:01 +0000 | |
---|---|---|
committer | 2018-03-04 16:33:01 +0000 | |
commit | 5099ae7055b313d1a93d53069c2cfbb0ca0dcf5a (patch) | |
tree | e8d4b781a38b17502f24e1fd9f444926e88544d6 /app_test.py | |
parent | Fix navbar dropdown (diff) |
Info pages #13xan #13xak (#36)
* Info pages and templates
* Info pages and templates
* Info pages and templates
* Update navigation and fix up HTML
* Navigation HTML spacing for readability
* Fix error views not using `self.render()`
* `render()` method should accept Any for context values
* Change header linking CSS to a dedicated class
* Rules page
* Basic resources page setup
* Fix headers for new CSS class
* Resource categories and initial resource data
* Add link to JSON file on GH - won't work until the branch is merged
* Remove info overview page and redirect info root url to resources
* Flake8
* Add some tests
* Line lengths
Diffstat (limited to 'app_test.py')
-rw-r--r-- | app_test.py | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/app_test.py b/app_test.py index 2e8a53fb..39c61ff5 100644 --- a/app_test.py +++ b/app_test.py @@ -33,11 +33,32 @@ class BaseEndpoints(SiteTest): response = self.client.get('/', 'http://pytest.local') self.assertEqual(response.status_code, 200) + def test_info_index(self): + """ Check the info index path responds with a 301 """ + response = self.client.get('/info') + self.assertEqual(response.status_code, 301) + def test_info_help(self): """ Check the info help path responds with 200 OK """ response = self.client.get('/info/help') self.assertEqual(response.status_code, 200) + def test_info_resources(self): + """ Check the info resources path responds with 200 OK """ + response = self.client.get('/info/resources') + self.assertEqual(response.status_code, 200) + + def test_info_resources_json(self): + """ Check the resources JSON loads correctly """ + response = self.client.get('/static/resources.json') + self.assertEqual(response.status_code, 200) + self.assertIsInstance(json.loads(response.data), dict) + + def test_info_rules(self): + """ Check the info rules path responds with 200 OK """ + response = self.client.get('/info/help') + self.assertEqual(response.status_code, 200) + def test_not_found(self): """ Check paths without handlers returns 404 Not Found """ response = self.client.get('/nonexistentpath') |