Fix bug 1467
[osm/N2VC.git] / n2vc / tests / unit / test_libjuju.py
index b7c7901..9ab6ddb 100644 (file)
@@ -24,7 +24,6 @@ from .utils import FakeN2VC, FakeMachine, FakeApplication
 from n2vc.libjuju import Libjuju
 from n2vc.exceptions import (
     JujuControllerFailedConnecting,
-    JujuModelAlreadyExists,
     JujuMachineNotFound,
     JujuApplicationNotFound,
     JujuActionNotFound,
@@ -238,10 +237,10 @@ class AddModelTest(LibjujuTestCase):
     ):
         mock_model_exists.return_value = True
 
-        with self.assertRaises(JujuModelAlreadyExists):
-            self.loop.run_until_complete(
-                self.libjuju.add_model("existing_model", "cloud")
-            )
+        # This should not raise an exception
+        self.loop.run_until_complete(
+            self.libjuju.add_model("existing_model", "cloud")
+        )
 
         mock_disconnect_controller.assert_called()