diff options
Diffstat (limited to 'pydis_site/apps/content/tests/helpers.py')
-rw-r--r-- | pydis_site/apps/content/tests/helpers.py | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/pydis_site/apps/content/tests/helpers.py b/pydis_site/apps/content/tests/helpers.py index be91b95a..59cd3bd6 100644 --- a/pydis_site/apps/content/tests/helpers.py +++ b/pydis_site/apps/content/tests/helpers.py @@ -8,6 +8,7 @@ description: TestDescription relevant_links: Python Discord: https://pythondiscord.com Discord: https://discord.com +toc: 0 --- # This is a header. """ @@ -32,7 +33,8 @@ PARSED_METADATA = { "relevant_links": { "Python Discord": "https://pythondiscord.com", "Discord": "https://discord.com" - } + }, + "toc": 0 } # The YAML data parsed from the above _info.yml file @@ -50,7 +52,10 @@ class MockPagesTestCase(TestCase): ├── not_a_page.md ├── tmp | ├── _info.yml - | └── category_without_info + | ├── tmp.md + | └── category + | ├── _info.yml + | └── subcategory_without_info └── category ├── _info.yml ├── with_metadata.md @@ -81,4 +86,6 @@ class MockPagesTestCase(TestCase): # for testing purposes. # See: https://jmcgeheeiv.github.io/pyfakefs/release/usage.html#os-temporary-directories self.fs.create_file("tmp/_info.yml", contents=CATEGORY_INFO) - self.fs.create_dir("tmp/category_without_info") + self.fs.create_file("tmp/tmp.md", contents=MARKDOWN_WITH_METADATA) + self.fs.create_file("tmp/category/_info.yml", contents=MARKDOWN_WITH_METADATA) + self.fs.create_dir("tmp/category/subcategory_without_info") |