Skip to content

Commit

Permalink
Test the CORS headers for the actual landing page.
Browse files Browse the repository at this point in the history
This test function assertion was added in 54dca40
It only tests the redirection to the landing page but not the actual landing page.

This change ensures the landing page is also covered by this test.

It may make sense to test all the pages, which could be done in a separate change.
  • Loading branch information
adk-swisstopo committed Aug 8, 2024
1 parent 58a2c20 commit 5961c6e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/tests/tests_09/test_landing_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ def setUp(self):
def test_landing_page(self):
response = self.client.get(f"/{STAC_BASE_V}/")
self.assertEqual(response.status_code, 200)
self.assertCors(response)
self.assertEqual(response['Content-Type'], 'application/json')
required_keys = ['description', 'id', 'stac_version', 'links']
self.assertEqual(
Expand Down
1 change: 1 addition & 0 deletions app/tests/tests_10/test_landing_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ def setUp(self):
def test_landing_page(self):
response = self.client.get(f"/{STAC_BASE_V}/")
self.assertEqual(response.status_code, 200)
self.assertCors(response)
self.assertEqual(response['Content-Type'], 'application/json')
required_keys = ['description', 'id', 'stac_version', 'links', 'type']
self.assertEqual(
Expand Down

0 comments on commit 5961c6e

Please sign in to comment.