From acf7880e233faeb91ce2eeb59855f40b6e7db3e0 Mon Sep 17 00:00:00 2001 From: kosayoda Date: Thu, 25 Mar 2021 16:36:16 +0800 Subject: 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%. --- pydis_site/apps/content/views/page_category.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pydis_site/apps/content/views') 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) -- cgit v1.2.3