From c7f5a83e3a8b8ff22e3fda36156a43f7315539b0 Mon Sep 17 00:00:00 2001 From: Nanda Scott Date: Tue, 23 Oct 2018 12:28:17 -0400 Subject: [PATCH] Created unit test for catalog --- unittests/TestCatalog.py | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 unittests/TestCatalog.py diff --git a/unittests/TestCatalog.py b/unittests/TestCatalog.py new file mode 100644 index 0000000..1c7754c --- /dev/null +++ b/unittests/TestCatalog.py @@ -0,0 +1,27 @@ +# This workaround makes sure that we can import from the parent dir +import sys +sys.path.append('..') + +from scrython.catalog import ArtifactTypes +import unittest +import time + +artifacts = ArtifactTypes() + +class TestCatalog(unittest.TestCase): + + def test_object(self): + self.assertIsInstance(artifacts.object(), str) + self.assertEqual(artifacts.object(), 'catalog') + + def test_uri(self): + self.assertIsInstance(artifacts.uri(), str) + + def test_total_values(self): + self.assertIsInstance(artifacts.total_values(), int) + + def test_data(self): + self.assertIsInstance(artifacts.data(), list) + +if __name__ == '__main__': + unittest.main() \ No newline at end of file