Remove EntityType from juju watcher and workaround juju bug for retrieving the status
[osm/N2VC.git] / n2vc / tests / unit / test_utils.py
index 3bab705..c5ab84f 100644 (file)
@@ -40,14 +40,14 @@ class UtilsTest(TestCase):
     def test_juju_status_to_osm(self):
         tests = [
             {
     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},
                 ],
             },
             {
                 "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},
                 "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},
                 "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},
                 "status": [
                     {"juju": "running", "osm": N2VCDeploymentStatus.RUNNING},
                     {"juju": "completed", "osm": N2VCDeploymentStatus.COMPLETED},