X-Git-Url: https://osm.etsi.org/gitweb/?p=osm%2FN2VC.git;a=blobdiff_plain;f=n2vc%2Ftests%2Funit%2Ftest_libjuju.py;h=ad0933c0269b80034f6270936dc0cfc034b73477;hp=b7c7901525e39b260a4d4f4cbaf5bb6a7bb3ed0d;hb=a71d4a04c1e8ad3ffe1a129024e6dbc14d6d3bd5;hpb=f6e9b00b6f7cd35e45ace4c84b53fe8d12b2438c;ds=sidebyside diff --git a/n2vc/tests/unit/test_libjuju.py b/n2vc/tests/unit/test_libjuju.py index b7c7901..ad0933c 100644 --- a/n2vc/tests/unit/test_libjuju.py +++ b/n2vc/tests/unit/test_libjuju.py @@ -24,7 +24,6 @@ from .utils import FakeN2VC, FakeMachine, FakeApplication from n2vc.libjuju import Libjuju from n2vc.exceptions import ( JujuControllerFailedConnecting, - JujuModelAlreadyExists, JujuMachineNotFound, JujuApplicationNotFound, JujuActionNotFound, @@ -67,8 +66,6 @@ class LibjujuTestCase(asynctest.TestCase): log=None, db={"get_one": []}, n2vc=n2vc, - apt_mirror="192.168.0.100", - enable_os_upgrade=True, ) logging.disable(logging.CRITICAL) loop.run_until_complete(self.libjuju.disconnect()) @@ -106,8 +103,6 @@ class LibjujuInitTestCase(asynctest.TestCase): log=None, db={"get_one": []}, n2vc=self.n2vc, - apt_mirror="192.168.0.100", - enable_os_upgrade=True, ) mock_update_endpoints.assert_called_once_with([self.endpoint]) mock__get_api_endpoints_db.assert_called_once() @@ -129,8 +124,6 @@ class LibjujuInitTestCase(asynctest.TestCase): log=None, db={"get_one": []}, n2vc=self.n2vc, - apt_mirror="192.168.0.100", - enable_os_upgrade=True, ) mock_update_endpoints.assert_not_called() mock__get_api_endpoints_db.assert_called_once() @@ -152,8 +145,6 @@ class LibjujuInitTestCase(asynctest.TestCase): log=None, db={"get_one": []}, n2vc=self.n2vc, - apt_mirror="192.168.0.100", - enable_os_upgrade=True, ) mock_update_endpoints.assert_called_once_with([self.endpoint]) mock__get_api_endpoints_db.assert_called_once() @@ -238,10 +229,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()