aboutsummaryrefslogtreecommitdiffstats
path: root/pydis_site/apps/content/tests
diff options
context:
space:
mode:
Diffstat (limited to 'pydis_site/apps/content/tests')
-rw-r--r--pydis_site/apps/content/tests/helpers.py2
-rw-r--r--pydis_site/apps/content/tests/test_templatetags.py12
-rw-r--r--pydis_site/apps/content/tests/test_views.py2
3 files changed, 2 insertions, 14 deletions
diff --git a/pydis_site/apps/content/tests/helpers.py b/pydis_site/apps/content/tests/helpers.py
index 202dee42..29140375 100644
--- a/pydis_site/apps/content/tests/helpers.py
+++ b/pydis_site/apps/content/tests/helpers.py
@@ -87,5 +87,5 @@ class MockPagesTestCase(TestCase):
# See: https://jmcgeheeiv.github.io/pyfakefs/release/usage.html#os-temporary-directories
self.fs.create_file("tmp/_info.yml", contents=CATEGORY_INFO)
self.fs.create_file("tmp.md", contents=MARKDOWN_WITH_METADATA)
- self.fs.create_file("tmp/category/_info.yml", contents=MARKDOWN_WITH_METADATA)
+ self.fs.create_file("tmp/category/_info.yml", contents=CATEGORY_INFO)
self.fs.create_dir("tmp/category/subcategory_without_info")
diff --git a/pydis_site/apps/content/tests/test_templatetags.py b/pydis_site/apps/content/tests/test_templatetags.py
deleted file mode 100644
index 1147bd88..00000000
--- a/pydis_site/apps/content/tests/test_templatetags.py
+++ /dev/null
@@ -1,12 +0,0 @@
-from django.test import TestCase
-
-from pydis_site.apps.content.templatetags.str_methods import replace_hyphens
-
-
-class TestTemplateTags(TestCase):
- """Tests for the custom template tags in the content app."""
-
- def test_replace_hyphens(self):
- self.assertEquals(replace_hyphens("word-with-hyphens", " "), "word with hyphens")
- self.assertEquals(replace_hyphens("---", ""), "")
- self.assertEquals(replace_hyphens("hi----", "A"), "hiAAAA")
diff --git a/pydis_site/apps/content/tests/test_views.py b/pydis_site/apps/content/tests/test_views.py
index 36d771a1..74d38f78 100644
--- a/pydis_site/apps/content/tests/test_views.py
+++ b/pydis_site/apps/content/tests/test_views.py
@@ -161,7 +161,7 @@ class PageOrCategoryViewTests(MockPagesTestCase, SimpleTestCase, TestCase):
"page_title": PARSED_METADATA["title"],
"page_description": PARSED_METADATA["description"],
"relevant_links": PARSED_METADATA["relevant_links"],
- "subarticles": ["category"]
+ "subarticles": [{"path": "category", "name": "Category Name"}]
}
for key, expected_value in expected_page_context.items():
with self.subTest():