aboutsummaryrefslogtreecommitdiffstats
path: root/functest/tests/unit/cli/commands
diff options
context:
space:
mode:
authorCedric Ollivier <ollivier.cedric@gmail.com>2017-01-09 08:12:35 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-01-09 08:12:35 +0000
commit2000f080a5a8a8a436a1858d7dedf835f352e495 (patch)
tree0bea7fc0585e7c1b48adb13141aeffcfa5ad7aed /functest/tests/unit/cli/commands
parentfec5f179377a891117c4f3f3665df47063a1e1bd (diff)
parent1406a4e103188cdb59bedfacc0d1a1ce3e15cb03 (diff)
Merge changes from topics 'cover_parse_results', 'fix_test_show_credentials', 'remove_clean_results_dir', 'cover_argparse', 're.sub', 'mock_open', 'patch_filehandler'
* changes: Cover ODLTests.parse_results() Switch to assert_any_call in test_show_credentials Remove clean_results_dir Create ODLParser to parse sys.argv Fully cover set_robotframework_vars Use mock_open() to prevent stdout.txt Patch logging.FileHandler
Diffstat (limited to 'functest/tests/unit/cli/commands')
-rw-r--r--functest/tests/unit/cli/commands/test_cli_env.py1
-rw-r--r--functest/tests/unit/cli/commands/test_cli_os.py2
2 files changed, 2 insertions, 1 deletions
diff --git a/functest/tests/unit/cli/commands/test_cli_env.py b/functest/tests/unit/cli/commands/test_cli_env.py
index 4b6ea57a..f70761dc 100644
--- a/functest/tests/unit/cli/commands/test_cli_env.py
+++ b/functest/tests/unit/cli/commands/test_cli_env.py
@@ -11,6 +11,7 @@ import unittest
from git.exc import NoSuchPathError
import mock
+mock.patch('logging.FileHandler').start() # noqa
from functest.cli.commands import cli_env
from functest.utils.constants import CONST
from functest.tests.unit import test_utils
diff --git a/functest/tests/unit/cli/commands/test_cli_os.py b/functest/tests/unit/cli/commands/test_cli_os.py
index 9e704806..f0e58c67 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__":