aboutsummaryrefslogtreecommitdiffstats
path: root/pydis_site/apps/content/views
diff options
context:
space:
mode:
authorGravatar kosayoda <[email protected]>2021-03-25 16:36:16 +0800
committerGravatar kosayoda <[email protected]>2021-03-25 16:36:16 +0800
commitacf7880e233faeb91ce2eeb59855f40b6e7db3e0 (patch)
tree6c4eff2c0249a1f9cec1832c55312da6016a3c40 /pydis_site/apps/content/views
parentReplace `markdown2` with `markdown` and `python-frontmatter`. (diff)
Refactor content app tests.
The tests uses pyfakefs to simulate a fake filesystem that is reused over the content app tests. Test coverage for the app is brought to 100%.
Diffstat (limited to 'pydis_site/apps/content/views')
-rw-r--r--pydis_site/apps/content/views/page_category.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/pydis_site/apps/content/views/page_category.py b/pydis_site/apps/content/views/page_category.py
index 4a2ed2d6..eec4e7e5 100644
--- a/pydis_site/apps/content/views/page_category.py
+++ b/pydis_site/apps/content/views/page_category.py
@@ -13,7 +13,7 @@ class PageOrCategoryView(TemplateView):
def dispatch(self, request: t.Any, *args, **kwargs) -> t.Any:
"""Conform URL path location to the filesystem path."""
- self.location = Path(self.kwargs.get("location", ""))
+ self.location = Path(kwargs.get("location", ""))
self.full_location = settings.PAGES_PATH / self.location
return super().dispatch(request, *args, **kwargs)