diff --git a/tests/functional/test_system.py b/tests/functional/test_system.py new file mode 100644 index 0000000..6b7b26c --- /dev/null +++ b/tests/functional/test_system.py @@ -0,0 +1,31 @@ +import logging +import unittest + +import trovebox +from tests.functional import test_base + +class TestSystem(test_base.TestBase): + testcase_name = "system" + + def setUp(self): + """ + Override the default setUp, since we don't need a populated database + """ + logging.info("\nRunning %s...", self.id()) + + def test_system_version(self): + """ + Check that the API version string is returned correctly + """ + client = trovebox.Trovebox(config_file=self.config_file) + version = client.system.version() + self.assertEqual(version["api"], "v%s" % trovebox.LATEST_API_VERSION) + + @unittest.skip("Diagnostics don't work with the hosted site") + def test_system_diagnostics(self): + """ + Check that the system diagnostics can be performed + """ + client = trovebox.Trovebox(config_file=self.config_file) + diagnostics = client.system.diagnostics() + self.assertIn(diagnostics, "database")