Add system.version functional test
This commit is contained in:
parent
c4f152fcc9
commit
8f488365c9
1 changed files with 31 additions and 0 deletions
31
tests/functional/test_system.py
Normal file
31
tests/functional/test_system.py
Normal file
|
@ -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")
|
Loading…
Add table
Add a link
Reference in a new issue