From b46115a43bcbe7214178f00cc97a8e5de018ee3f Mon Sep 17 00:00:00 2001 From: Cédric Ollivier Date: Thu, 5 Jan 2017 09:00:04 +0100 Subject: Switch to assert_any_call in test_show_credentials MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The previous test can be false if users set OS_ env vars. Change-Id: If517582d77aa1373bf253d7e23731e2e896d26ac Signed-off-by: Cédric Ollivier --- functest/tests/unit/cli/commands/test_cli_os.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functest/tests/unit/cli/commands/test_cli_os.py b/functest/tests/unit/cli/commands/test_cli_os.py index 9e704806b..f0e58c676 100644 --- a/functest/tests/unit/cli/commands/test_cli_os.py +++ b/functest/tests/unit/cli/commands/test_cli_os.py @@ -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__": -- cgit 1.2.3-korg