X-Git-Url: https://osm.etsi.org/gitweb/?p=osm%2FN2VC.git;a=blobdiff_plain;f=n2vc%2Ftests%2Funit%2Ftest_juju_watcher.py;h=d333b33a95b524ea21499cd44192f3b024cbaca9;hp=41065bff44e31c4992340c92e0b1f44c45c7c911;hb=refs%2Fchanges%2F98%2F10498%2F1;hpb=ff9d9013c43951a782da38116357a8274b4549ee diff --git a/n2vc/tests/unit/test_juju_watcher.py b/n2vc/tests/unit/test_juju_watcher.py index 41065bf..d333b33 100644 --- a/n2vc/tests/unit/test_juju_watcher.py +++ b/n2vc/tests/unit/test_juju_watcher.py @@ -142,6 +142,7 @@ class StatusTest(TestCase): self.assertTrue(isinstance(value, str)) +@asynctest.mock.patch("asyncio.sleep") class WaitForModelTest(asynctest.TestCase): @asynctest.mock.patch("juju.client.connector.Connector.connect") def setUp(self, mock_connect=None): @@ -149,7 +150,7 @@ class WaitForModelTest(asynctest.TestCase): self.model = Model() @asynctest.mock.patch("juju.model.Model.block_until") - def test_wait_for_model(self, mock_block_until): + def test_wait_for_model(self, mock_block_until, mock_sleep): self.loop.run_until_complete( JujuModelWatcher.wait_for_model(self.model, timeout=None) ) @@ -157,7 +158,7 @@ class WaitForModelTest(asynctest.TestCase): @asynctest.mock.patch("asyncio.ensure_future") @asynctest.mock.patch("asyncio.wait") - def test_wait_for_model_exception(self, mock_wait, mock_ensure_future): + def test_wait_for_model_exception(self, mock_wait, mock_ensure_future, mock_sleep): task = Mock() mock_ensure_future.return_value = task mock_wait.side_effect = Exception