aboutsummaryrefslogtreecommitdiffstats
path: root/pydis_site/apps/content/tests
diff options
context:
space:
mode:
authorGravatar Johannes Christ <[email protected]>2021-11-26 20:27:48 +0100
committerGravatar GitHub <[email protected]>2021-11-26 20:27:48 +0100
commitd86f71448225d0c7937f05f5c1c5508199415f4d (patch)
tree03a1c6106dc6cbdee20c08402051e84aa0153339 /pydis_site/apps/content/tests
parentAdds Redirects To Static Builds (diff)
parentMerge pull request #621 from python-discord/add-dm_sent-field (diff)
Merge branch 'main' into redirects
Diffstat (limited to 'pydis_site/apps/content/tests')
-rw-r--r--pydis_site/apps/content/tests/test_views.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/pydis_site/apps/content/tests/test_views.py b/pydis_site/apps/content/tests/test_views.py
index b6e752d6..eadad7e3 100644
--- a/pydis_site/apps/content/tests/test_views.py
+++ b/pydis_site/apps/content/tests/test_views.py
@@ -167,11 +167,16 @@ class PageOrCategoryViewTests(MockPagesTestCase, SimpleTestCase, TestCase):
self.ViewClass.dispatch(request, location="category/subcategory/with_metadata")
context = self.ViewClass.get_context_data()
+
+ # Convert to paths to avoid dealing with non-standard path separators
+ for item in context["breadcrumb_items"]:
+ item["path"] = Path(item["path"])
+
self.assertEquals(
context["breadcrumb_items"],
[
- {"name": PARSED_CATEGORY_INFO["title"], "path": "."},
- {"name": PARSED_CATEGORY_INFO["title"], "path": "category"},
- {"name": PARSED_CATEGORY_INFO["title"], "path": "category/subcategory"},
+ {"name": PARSED_CATEGORY_INFO["title"], "path": Path(".")},
+ {"name": PARSED_CATEGORY_INFO["title"], "path": Path("category")},
+ {"name": PARSED_CATEGORY_INFO["title"], "path": Path("category/subcategory")},
]
)