""" templates unit tests """ import unittest from pathlib import Path import templates class TemplatesUnittest(unittest.TestCase): """templates unit tests""" def test_get_templates_dir_is_valid(self): """verify that default templates dir is valid""" path = templates.get_templates_dir() self.assertTrue(isinstance(path, Path)) self.assertTrue(path.exists()) self.assertTrue(path.is_dir()) def test_get_templates(self): """verify that templates are available by default""" path = templates.get_templates_dir() result = templates.get_templates(path) self.assertGreater(len(result), 0) for template in result: self.assertTrue(isinstance(template, Path)) self.assertTrue(template.exists()) self.assertTrue(template.is_file())