@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,
@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,
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):
@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.'
@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.'