diff options
author | Koren Lev <korenlev@gmail.com> | 2017-09-29 01:38:18 +0300 |
---|---|---|
committer | Yaron Yogev <yaronyogev@gmail.com> | 2017-10-03 09:46:58 +0000 |
commit | d0adff06bed72f9a0edd7adccfa6a1111784bc8b (patch) | |
tree | 4b5eaf1107e6973b1eac636309a99c83074acbfc /app/test/fetch/cli_fetch | |
parent | fbbaf20912c79bd99a5c3696850d70c11965f56b (diff) |
release 1.0 calipso for opnfv apex
Change-Id: I3e63cd27c5f4d3756e67a07c749863a68e84dde2
Signed-off-by: Koren Lev <korenlev@gmail.com>
(cherry picked from commit d32f75145676bacefde0d08a14680a5984623451)
Diffstat (limited to 'app/test/fetch/cli_fetch')
-rw-r--r-- | app/test/fetch/cli_fetch/test_cli_access.py | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/app/test/fetch/cli_fetch/test_cli_access.py b/app/test/fetch/cli_fetch/test_cli_access.py index d32e1ed..1d14450 100644 --- a/app/test/fetch/cli_fetch/test_cli_access.py +++ b/app/test/fetch/cli_fetch/test_cli_access.py @@ -10,10 +10,11 @@ import time from discover.fetchers.cli.cli_access import CliAccess +from discover.configuration import Configuration +from test.fetch.api_fetch.test_data.configurations import CONFIGURATIONS from test.fetch.cli_fetch.test_data.cli_access import * from test.fetch.test_fetch import TestFetch -from unittest.mock import MagicMock, patch -from utils.ssh_conn import SshConn +from unittest.mock import MagicMock class TestCliAccess(TestFetch): @@ -22,6 +23,11 @@ class TestCliAccess(TestFetch): super().setUp() self.configure_environment() self.cli_access = CliAccess() + self.conf = Configuration() + self.cli_access.configuration = self.conf + self.conf.use_env = MagicMock() + self.conf.environment = CONFIGURATIONS + self.conf.configuration = CONFIGURATIONS["configuration"] def check_run_result(self, is_gateway_host, enable_cache, @@ -40,7 +46,8 @@ class TestCliAccess(TestFetch): self.ssh_conn.exec.return_value = exec_result self.ssh_conn.is_gateway_host.return_value = is_gateway_host result = self.cli_access.run(COMMAND, COMPUTE_HOST_ID, - on_gateway=False, enable_cache=enable_cache) + on_gateway=False, + enable_cache=enable_cache) self.assertEqual(result, expected_result, err_msg) # reset the cached commands after testing |