aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar hedy <[email protected]>2024-04-06 13:06:25 +0800
committerGravatar ~hedy <[email protected]>2024-05-24 12:46:13 +0800
commitfe1f42d7930c7cb07dcf3621b3608d18d5a7cd06 (patch)
tree775eba9a9b19ba717c5e3fed14d32c0204f4d58b
parentTimeline: More muted heading links for entries (diff)
Timeline: Add basic test for the timeline view
-rw-r--r--pydis_site/apps/timeline/tests/__init__.py0
-rw-r--r--pydis_site/apps/timeline/tests/test_views.py10
2 files changed, 10 insertions, 0 deletions
diff --git a/pydis_site/apps/timeline/tests/__init__.py b/pydis_site/apps/timeline/tests/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/pydis_site/apps/timeline/tests/__init__.py
diff --git a/pydis_site/apps/timeline/tests/test_views.py b/pydis_site/apps/timeline/tests/test_views.py
new file mode 100644
index 00000000..a3e2e805
--- /dev/null
+++ b/pydis_site/apps/timeline/tests/test_views.py
@@ -0,0 +1,10 @@
+from django.test import TestCase
+from django.urls import reverse
+
+
+class TestIndexReturns200(TestCase):
+ def test_index_returns_200(self):
+ """Check that the index page returns a HTTP 200 response."""
+ url = reverse('timeline:index')
+ resp = self.client.get(url)
+ self.assertEqual(resp.status_code, 200)