Fix 1473 and add vca_model_config_* to lcm charm
[osm/devops.git] / installers / charm / mon / tests / test_pod_spec.py
index eff2713..86a3d16 100644 (file)
@@ -20,7 +20,6 @@
 # osm-charmers@lists.launchpad.net
 ##
 
-from pydantic import ValidationError
 from typing import NoReturn
 import unittest
 
@@ -200,7 +199,9 @@ class TestPodSpec(unittest.TestCase):
                         "OSMMON_DATABASE_DRIVER": "mongo",
                         "OSMMON_DATABASE_URI": relation_state["database_uri"],
                         "OSMMON_DATABASE_COMMONKEY": config["database_commonkey"],
-                        "OSMMON_PROMETHEUS_URL": f"http://{relation_state['prometheus_host']}:{relation_state['prometheus_port']}",
+                        "OSMMON_PROMETHEUS_URL": (
+                            f"http://{relation_state['prometheus_host']}:{relation_state['prometheus_port']}"
+                        ),
                         "OSMMON_VCA_HOST": config["vca_host"],
                         "OSMMON_VCA_USER": config["vca_user"],
                         "OSMMON_VCA_SECRET": config["vca_password"],
@@ -263,7 +264,7 @@ class TestPodSpec(unittest.TestCase):
         app_name = "mon"
         port = 8000
 
-        with self.assertRaises(ValidationError):
+        with self.assertRaises(ValueError):
             pod_spec.make_pod_spec(image_info, config, relation_state, app_name, port)
 
     def test_make_pod_spec_without_relation_state(self) -> NoReturn:
@@ -286,7 +287,7 @@ class TestPodSpec(unittest.TestCase):
         app_name = "mon"
         port = 8000
 
-        with self.assertRaises(ValidationError):
+        with self.assertRaises(ValueError):
             pod_spec.make_pod_spec(image_info, config, relation_state, app_name, port)