diff options
author | 2021-03-25 16:36:16 +0800 | |
---|---|---|
committer | 2021-03-25 16:36:16 +0800 | |
commit | acf7880e233faeb91ce2eeb59855f40b6e7db3e0 (patch) | |
tree | 6c4eff2c0249a1f9cec1832c55312da6016a3c40 /pydis_site/apps/content/utils.py | |
parent | Replace `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/utils.py')
-rw-r--r-- | pydis_site/apps/content/utils.py | 2 |
1 files changed, 1 insertions, 1 deletions
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 |