aboutsummaryrefslogtreecommitdiffstats
path: root/pydis_site/apps/home
diff options
context:
space:
mode:
authorGravatar Gareth Coles <[email protected]>2019-04-19 18:23:06 +0100
committerGravatar Gareth Coles <[email protected]>2019-04-19 18:23:06 +0100
commit0cd78b638c48ac14c592398da0ed19f3e5ca2e2e (patch)
treed74ebdf98537a6dd65dc926bcc3fed1458515c93 /pydis_site/apps/home
parentChar input has placeholder, finish dir listing (diff)
parentRevert linter to non-verbose. (diff)
Merge branch 'django' into django+200/wiki
# Conflicts: # Pipfile.lock # pydis_site/apps/home/tests.py
Diffstat (limited to 'pydis_site/apps/home')
-rw-r--r--pydis_site/apps/home/tests.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/pydis_site/apps/home/tests.py b/pydis_site/apps/home/tests.py
new file mode 100644
index 00000000..733ddaa3
--- /dev/null
+++ b/pydis_site/apps/home/tests.py
@@ -0,0 +1,16 @@
+from django.test import TestCase
+from django_hosts.resolvers import reverse
+
+from pydis_site.apps.home.templatetags import extra_filters
+
+
+class TestIndexReturns200(TestCase):
+ def test_index_returns_200(self):
+ url = reverse('home.index')
+ resp = self.client.get(url)
+ self.assertEqual(resp.status_code, 200)
+
+
+class TestExtraFilterTemplateTags(TestCase):
+ def test_starts_with(self):
+ self.assertTrue(extra_filters.starts_with('foo', 'f'))