Fixing unit test 07/11607/1
authorbeierlm <mark.beierl@canonical.com>
Mon, 31 Jan 2022 20:26:29 +0000 (15:26 -0500)
committerbeierlm <mark.beierl@canonical.com>
Mon, 31 Jan 2022 20:26:34 +0000 (15:26 -0500)
Bringing change from master/v11.0 in unit test to assert
that the disconnect was called, not just called once and
only once

Change-Id: I70fbe043cb05a8898f30d4b66285b7080ad76031
Signed-off-by: beierlm <mark.beierl@canonical.com>
n2vc/tests/unit/test_libjuju.py

index 02f2b21..918a2fb 100644 (file)
@@ -108,7 +108,7 @@ class GetControllerTest(LibjujuTestCase):
         with self.assertRaises(JujuControllerFailedConnecting):
             controller = self.loop.run_until_complete(self.libjuju.get_controller())
         self.assertIsNone(controller)
-        mock_disconnect_controller.assert_called_once()
+        mock_disconnect_controller.assert_called()
 
     def test_same_endpoint_get_controller(self, mock_api_endpoints, mock_connect):
         self.libjuju.endpoints = ["127.0.0.1:17070"]