Skip to content
Snippets Groups Projects
Commit 5fee2c83 authored by Michael Hanselmann's avatar Michael Hanselmann
Browse files

Checks for hypervisor constants


Add two tests for hypervisor constants.

Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
Reviewed-by: default avatarIustin Pop <iustin@google.com>
parent 125df9a8
No related branches found
No related tags found
No related merge requests found
......@@ -90,6 +90,14 @@ class TestConstants(unittest.TestCase):
self.assertFalse(constants.JOBS_PENDING - constants.JOB_STATUS_ALL)
self.assertFalse(constants.JOBS_FINALIZED - constants.JOB_STATUS_ALL)
def testDefaultsForAllHypervisors(self):
self.assertEqual(frozenset(constants.HVC_DEFAULTS.keys()),
constants.HYPER_TYPES)
def testDefaultHypervisor(self):
self.assertTrue(constants.DEFAULT_ENABLED_HYPERVISOR in
constants.HYPER_TYPES)
class TestExportedNames(unittest.TestCase):
_VALID_NAME_RE = re.compile(r"^[A-Z][A-Z0-9_]+$")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment