Skip to content

Commit fcbe10f

Browse files
committed
Add tests for the sitemap
1 parent 71e4423 commit fcbe10f

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions
22
name: Continuous Integration Checks
33

4-
# All branches
5-
on: [push, pull_request]
4+
# All PRs as well as pushes to main
5+
on:
6+
push:
7+
branches:
8+
- main
9+
pull_request:
610

711
jobs:
812
build:

pythonsd/tests/__init__.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,12 @@ def test_api_error(self):
214214
self.assertContains(response, "Check out our")
215215

216216

217+
class TestSitemap(test.TestCase):
218+
def test_sitemap(self):
219+
resp = self.client.get("/sitemap.xml")
220+
self.assertEqual(resp.status_code, 200)
221+
222+
217223
class TestWSGIApp(unittest.TestCase):
218224
@classmethod
219225
def setUpClass(cls):

0 commit comments

Comments
 (0)