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):
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)
)
@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