aboutsummaryrefslogtreecommitdiffstats
path: root/functest/tests
diff options
context:
space:
mode:
Diffstat (limited to 'functest/tests')
-rw-r--r--functest/tests/unit/cli/commands/test_cli_env.py6
-rw-r--r--functest/tests/unit/cli/commands/test_cli_os.py1
-rw-r--r--functest/tests/unit/cli/test_cli_base.py2
-rw-r--r--functest/tests/unit/openstack/refstack_client/test_refstack_client.py8
-rw-r--r--functest/tests/unit/openstack/tempest/test_conf_utils.py5
5 files changed, 10 insertions, 12 deletions
diff --git a/functest/tests/unit/cli/commands/test_cli_env.py b/functest/tests/unit/cli/commands/test_cli_env.py
index 88377234..d17da166 100644
--- a/functest/tests/unit/cli/commands/test_cli_env.py
+++ b/functest/tests/unit/cli/commands/test_cli_env.py
@@ -48,9 +48,6 @@ class CliEnvTesting(unittest.TestCase):
elif var == 'BUILD_TAG':
os.environ['BUILD_TAG'] = ''
reg_string = r"| BUILD TAG: None|"
- elif var == 'DEBUG':
- os.environ['CI_DEBUG'] = ''
- reg_string = r"| DEBUG FLAG: false\s*|"
with mock.patch('functest.cli.commands.cli_env.click.echo') \
as mock_click_echo:
@@ -72,9 +69,6 @@ class CliEnvTesting(unittest.TestCase):
def test_show_missing_ci_build_tag(self, *args):
self._test_show_missing_env_var('BUILD_TAG', *args)
- def test_show_missing_ci_debug(self, *args):
- self._test_show_missing_env_var('DEBUG', *args)
-
if __name__ == "__main__":
logging.disable(logging.CRITICAL)
diff --git a/functest/tests/unit/cli/commands/test_cli_os.py b/functest/tests/unit/cli/commands/test_cli_os.py
index 1626ab1b..02392d2d 100644
--- a/functest/tests/unit/cli/commands/test_cli_os.py
+++ b/functest/tests/unit/cli/commands/test_cli_os.py
@@ -26,6 +26,7 @@ class CliOpenStackTesting(unittest.TestCase):
self.installer_ip = 'test_installer_ip'
self.openstack_creds = 'test_env_file'
self.snapshot_file = 'test_snapshot_file'
+ os.environ["OS_AUTH_URL"] = ''
self.cli_os = cli_os.CliOpenStack()
def test_ping_endpoint_default(self):
diff --git a/functest/tests/unit/cli/test_cli_base.py b/functest/tests/unit/cli/test_cli_base.py
index 876e8aa1..185a5220 100644
--- a/functest/tests/unit/cli/test_cli_base.py
+++ b/functest/tests/unit/cli/test_cli_base.py
@@ -10,6 +10,7 @@
# pylint: disable=missing-docstring
import logging
+import os
import unittest
import mock
@@ -19,6 +20,7 @@ with mock.patch('functest.cli.commands.cli_testcase.CliTestcase.__init__',
mock.Mock(return_value=None)), \
mock.patch('functest.cli.commands.cli_tier.CliTier.__init__',
mock.Mock(return_value=None)):
+ os.environ['OS_AUTH_URL'] = ''
from functest.cli import cli_base
diff --git a/functest/tests/unit/openstack/refstack_client/test_refstack_client.py b/functest/tests/unit/openstack/refstack_client/test_refstack_client.py
index a7a914cb..e2e7dceb 100644
--- a/functest/tests/unit/openstack/refstack_client/test_refstack_client.py
+++ b/functest/tests/unit/openstack/refstack_client/test_refstack_client.py
@@ -10,6 +10,7 @@
# pylint: disable=missing-docstring
import logging
+import os
import unittest
import mock
@@ -18,7 +19,6 @@ import pkg_resources
from functest.core import testcase
from functest.opnfv_tests.openstack.refstack_client.refstack_client import \
RefstackClient, RefstackClientParser
-from functest.utils.constants import CONST
from snaps.openstack.os_credentials import OSCreds
@@ -39,8 +39,8 @@ class OSRefstackClientTesting(unittest.TestCase):
def setUp(self):
self.default_args = {'config': self._config,
'testlist': self._testlist}
- CONST.__setattr__('OS_AUTH_URL', 'https://ip:5000/v3')
- CONST.__setattr__('OS_INSECURE', 'true')
+ os.environ['OS_AUTH_URL'] = 'https://ip:5000/v3'
+ os.environ['OS_INSECURE'] = 'true'
self.case_name = 'refstack_defcore'
self.result = 0
self.os_creds = OSCreds(
@@ -70,7 +70,7 @@ class OSRefstackClientTesting(unittest.TestCase):
m_cmd.assert_any_call(cmd)
def test_run_defcore(self):
- CONST.__setattr__('OS_AUTH_URL', 'http://ip:5000/v3')
+ os.environ['OS_AUTH_URL'] = 'http://ip:5000/v3'
insecure = ''
config = 'tempest.conf'
testlist = 'testlist'
diff --git a/functest/tests/unit/openstack/tempest/test_conf_utils.py b/functest/tests/unit/openstack/tempest/test_conf_utils.py
index 5fed742c..323a1ee0 100644
--- a/functest/tests/unit/openstack/tempest/test_conf_utils.py
+++ b/functest/tests/unit/openstack/tempest/test_conf_utils.py
@@ -259,8 +259,9 @@ class OSTempestConfUtilsTesting(unittest.TestCase):
mock.patch('functest.opnfv_tests.openstack.tempest.'
'conf_utils.shutil.copyfile'):
conf_utils.configure_tempest_defcore(
- 'test_dep_dir', 'test_image_id', 'test_flavor_id',
- 'test_image_alt_id', 'test_flavor_alt_id', 'test_tenant_id')
+ 'test_dep_dir', 'test_network_name', 'test_image_id',
+ 'test_flavor_id', 'test_image_alt_id', 'test_flavor_alt_id',
+ 'test_tenant_id')
mset.assert_any_call('compute', 'image_ref', 'test_image_id')
mset.assert_any_call('compute', 'image_ref_alt',
'test_image_alt_id')