diff options
author | 2020-10-12 01:03:42 +0100 | |
---|---|---|
committer | 2020-10-12 01:03:42 +0100 | |
commit | 479624eab5074427345ea46e226acd58807d285b (patch) | |
tree | 7698014669a5d55da8f1f899aa56f6bee3ea3dc0 | |
parent | Update default picture to community logo (diff) |
Add unit test for timeline page
-rw-r--r-- | pydis_site/apps/home/tests/test_views.py | 7 | ||||
-rw-r--r-- | pydis_site/apps/home/urls.py | 2 |
2 files changed, 8 insertions, 1 deletions
diff --git a/pydis_site/apps/home/tests/test_views.py b/pydis_site/apps/home/tests/test_views.py index 572317a7..6ef4cf30 100644 --- a/pydis_site/apps/home/tests/test_views.py +++ b/pydis_site/apps/home/tests/test_views.py @@ -202,6 +202,13 @@ class TestIndexReturns200(TestCase): resp = self.client.get(url) self.assertEqual(resp.status_code, 200) +class TestTimelineReturns200(TestCase): + def test_timeline_returns_200(self): + """Check that the timeline page returns a HTTP 200 response.""" + url = reverse('timeline') + resp = self.client.get(url) + self.assertEqual(resp.status_code, 200) + class TestLoginCancelledReturns302(TestCase): def test_login_cancelled_returns_302(self): diff --git a/pydis_site/apps/home/urls.py b/pydis_site/apps/home/urls.py index cf0c7457..14d118f8 100644 --- a/pydis_site/apps/home/urls.py +++ b/pydis_site/apps/home/urls.py @@ -38,5 +38,5 @@ urlpatterns = [ path('admin/', admin.site.urls), path('notifications/', include('django_nyt.urls')), - path('timeline/', timeline), + path('timeline/', timeline, name="timeline"), ] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) |