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/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pydis_site/apps/content/utils.py') diff --git a/pydis_site/apps/content/utils.py b/pydis_site/apps/content/utils.py index 11d2b792..726c991f 100644 --- a/pydis_site/apps/content/utils.py +++ b/pydis_site/apps/content/utils.py @@ -33,7 +33,7 @@ def get_category_pages(path: Path) -> Dict[str, Dict]: for item in path.glob("*.md"): if item.is_file(): - pages[item.stem] = frontmatter.load(item) + pages[item.stem] = frontmatter.load(item).metadata return pages -- cgit v1.2.3