aboutsummaryrefslogtreecommitdiffstats
path: root/functest/tests/unit/openstack
diff options
context:
space:
mode:
Diffstat (limited to 'functest/tests/unit/openstack')
-rw-r--r--functest/tests/unit/openstack/rally/test_rally.py4
-rw-r--r--functest/tests/unit/openstack/tempest/test_conf_utils.py2
-rw-r--r--functest/tests/unit/openstack/vping/test_vping.py4
3 files changed, 10 insertions, 0 deletions
diff --git a/functest/tests/unit/openstack/rally/test_rally.py b/functest/tests/unit/openstack/rally/test_rally.py
index 9cc6bf53..5d82d91f 100644
--- a/functest/tests/unit/openstack/rally/test_rally.py
+++ b/functest/tests/unit/openstack/rally/test_rally.py
@@ -329,6 +329,8 @@ class OSRallyTesting(unittest.TestCase):
@mock.patch('snaps.openstack.utils.deploy_utils.create_image')
@mock.patch('snaps.openstack.utils.deploy_utils.create_network')
@mock.patch('snaps.openstack.utils.deploy_utils.create_router')
+ @mock.patch('snaps.openstack.utils.keystone_utils.keystone_client')
+ @mock.patch('snaps.openstack.utils.keystone_utils.get_project')
@mock.patch('snaps.openstack.create_flavor.OpenStackFlavor.create',
return_value=None)
def test_prepare_env_flavor_creation_failed(self, mock_create_flavor,
@@ -348,6 +350,8 @@ class OSRallyTesting(unittest.TestCase):
@mock.patch('snaps.openstack.utils.deploy_utils.create_image')
@mock.patch('snaps.openstack.utils.deploy_utils.create_network')
@mock.patch('snaps.openstack.utils.deploy_utils.create_router')
+ @mock.patch('snaps.openstack.utils.keystone_utils.keystone_client')
+ @mock.patch('snaps.openstack.utils.keystone_utils.get_project')
@mock.patch('snaps.openstack.create_flavor.OpenStackFlavor.create',
side_effect=[mock.Mock, None])
def test_prepare_env_flavor_alt_creation_failed(self, mock_create_flavor,
diff --git a/functest/tests/unit/openstack/tempest/test_conf_utils.py b/functest/tests/unit/openstack/tempest/test_conf_utils.py
index 323a1ee0..1097d481 100644
--- a/functest/tests/unit/openstack/tempest/test_conf_utils.py
+++ b/functest/tests/unit/openstack/tempest/test_conf_utils.py
@@ -67,6 +67,8 @@ class OSTempestConfUtilsTesting(unittest.TestCase):
return_value=mock.Mock())
@mock.patch('snaps.openstack.utils.deploy_utils.create_image',
return_value=mock.Mock())
+ @mock.patch('snaps.openstack.utils.keystone_utils.keystone_client')
+ @mock.patch('snaps.openstack.utils.keystone_utils.get_project')
@mock.patch('snaps.openstack.create_flavor.OpenStackFlavor.create',
return_value=None)
def test_create_res_missing_flavor(self, *mock_args):
diff --git a/functest/tests/unit/openstack/vping/test_vping.py b/functest/tests/unit/openstack/vping/test_vping.py
index 42650dea..91cf2259 100644
--- a/functest/tests/unit/openstack/vping/test_vping.py
+++ b/functest/tests/unit/openstack/vping/test_vping.py
@@ -50,6 +50,8 @@ class VPingUserdataTesting(unittest.TestCase):
@mock.patch('snaps.openstack.utils.deploy_utils.create_vm_instance')
@mock.patch('os.path.exists', return_value=True)
+ @mock.patch('snaps.openstack.utils.keystone_utils.keystone_client')
+ @mock.patch('snaps.openstack.utils.keystone_utils.get_project')
@mock.patch('snaps.openstack.create_flavor.OpenStackFlavor.create',
return_value=None)
@mock.patch('snaps.openstack.create_instance.OpenStackVmInstance.'
@@ -99,6 +101,8 @@ class VPingSSHTesting(unittest.TestCase):
@mock.patch('snaps.openstack.utils.deploy_utils.create_vm_instance')
@mock.patch('os.path.exists', return_value=True)
+ @mock.patch('snaps.openstack.utils.keystone_utils.keystone_client')
+ @mock.patch('snaps.openstack.utils.keystone_utils.get_project')
@mock.patch('snaps.openstack.create_flavor.OpenStackFlavor.create',
return_value=None)
@mock.patch('snaps.openstack.create_instance.OpenStackVmInstance.'