diff options
author | 2020-09-21 20:25:17 +0300 | |
---|---|---|
committer | 2020-09-21 20:25:17 +0300 | |
commit | eb5efc04b3f450f535c2b1b0ff13ca523a2b1f85 (patch) | |
tree | 22b59f518a2a80a48067b1b4644d71c53caa2c8d | |
parent | Fix errors in unit tests that is based on recent changes (diff) |
Create test for `_get_base_path`
-rw-r--r-- | pydis_site/apps/guides/tests/test_utils.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/pydis_site/apps/guides/tests/test_utils.py b/pydis_site/apps/guides/tests/test_utils.py index 9b96ce28..ad9916cc 100644 --- a/pydis_site/apps/guides/tests/test_utils.py +++ b/pydis_site/apps/guides/tests/test_utils.py @@ -9,6 +9,15 @@ from markdown import Markdown from pydis_site.apps.guides import utils +class TestGetBasePath(TestCase): + def test_get_base_path(self): + """Test does function return guides base path.""" + self.assertEqual( + utils._get_base_path(), + os.path.join(settings.BASE_DIR, "pydis_site", "apps", "guides", "resources", "guides") + ) + + class TestGetCategory(TestCase): def test_get_category_successfully(self): """Check does this get right data from category data file.""" |