diff --git a/unittests/test_parsers.py b/unittests/test_parsers.py index 756f0d509fc..a678823f4fb 100644 --- a/unittests/test_parsers.py +++ b/unittests/test_parsers.py @@ -1,5 +1,6 @@ from .dojo_test_case import DojoTestCase, get_unit_tests_path import os +import re basedir = os.path.join(get_unit_tests_path(), '..') @@ -27,6 +28,15 @@ def test_file_existence(self): os.path.isfile(doc_file), f"Documentation file '{doc_file}' is missing or using different name" ) + + content = open(doc_file).read() + self.assertTrue(re.search("title:", content), + f"Documentation file '{doc_file}' does not contain a title" + ) + self.assertTrue(re.search("toc_hide: true", content), + f"Documentation file '{doc_file}' does not contain toc_hide: true" + ) + if parser_dir.name not in [ # there is not exception for now