Switch to assert_any_call in test_show_credentials 03/26703/1
authorCédric Ollivier <cedric.ollivier@orange.com>
Thu, 5 Jan 2017 08:00:04 +0000 (09:00 +0100)
committerCédric Ollivier <cedric.ollivier@orange.com>
Thu, 5 Jan 2017 08:02:43 +0000 (09:02 +0100)
The previous test can be false if users set OS_ env vars.

Change-Id: If517582d77aa1373bf253d7e23731e2e896d26ac
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
functest/tests/unit/cli/commands/test_cli_os.py

index 9e70480..f0e58c6 100644 (file)
@@ -231,7 +231,7 @@ class CliOpenStackTesting(unittest.TestCase):
         value = 'OS_VALUE'
         with mock.patch.dict(os.environ, {key: value}):
             self.cli_os.show_credentials()
-            mock_click_echo.assert_called_once_with("{}={}".format(key, value))
+            mock_click_echo.assert_any_call("{}={}".format(key, value))
 
 
 if __name__ == "__main__":