Feature 10239: Distributed VCA
[osm/N2VC.git] / n2vc / tests / unit / test_utils.py
index 3bab705..bffbc29 100644 (file)
@@ -14,7 +14,7 @@
 
 from unittest import TestCase
 
-from n2vc.utils import Dict, EntityType, JujuStatusToOSM, N2VCDeploymentStatus, DB_DATA
+from n2vc.utils import Dict, EntityType, JujuStatusToOSM, N2VCDeploymentStatus
 from juju.machine import Machine
 from juju.application import Application
 from juju.action import Action
@@ -40,14 +40,14 @@ class UtilsTest(TestCase):
     def test_juju_status_to_osm(self):
         tests = [
             {
-                "entity_type": EntityType.MACHINE,
+                "entity_type": "machine",
                 "status": [
                     {"juju": "pending", "osm": N2VCDeploymentStatus.PENDING},
                     {"juju": "started", "osm": N2VCDeploymentStatus.COMPLETED},
                 ],
             },
             {
-                "entity_type": EntityType.APPLICATION,
+                "entity_type": "application",
                 "status": [
                     {"juju": "waiting", "osm": N2VCDeploymentStatus.RUNNING},
                     {"juju": "maintenance", "osm": N2VCDeploymentStatus.RUNNING},
@@ -57,7 +57,7 @@ class UtilsTest(TestCase):
                 ],
             },
             {
-                "entity_type": EntityType.UNIT,
+                "entity_type": "unit",
                 "status": [
                     {"juju": "waiting", "osm": N2VCDeploymentStatus.RUNNING},
                     {"juju": "maintenance", "osm": N2VCDeploymentStatus.RUNNING},
@@ -67,7 +67,7 @@ class UtilsTest(TestCase):
                 ],
             },
             {
-                "entity_type": EntityType.ACTION,
+                "entity_type": "action",
                 "status": [
                     {"juju": "running", "osm": N2VCDeploymentStatus.RUNNING},
                     {"juju": "completed", "osm": N2VCDeploymentStatus.COMPLETED},
@@ -84,8 +84,3 @@ class UtilsTest(TestCase):
                 osm_status = status["osm"]
                 self.assertTrue(juju_status in JujuStatusToOSM[entity_type])
                 self.assertEqual(osm_status, JujuStatusToOSM[entity_type][juju_status])
-
-    def test_db_data(self):
-        self.assertEqual(DB_DATA.api_endpoints.table, "admin")
-        self.assertEqual(DB_DATA.api_endpoints.filter, {"_id": "juju"})
-        self.assertEqual(DB_DATA.api_endpoints.key, "api_endpoints")