From: valentin boucher Date: Wed, 28 Feb 2018 14:49:11 +0000 (+0000) Subject: Merge "Support different user/project domain values" X-Git-Tag: opnfv-6.0.0~118 X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=5d6cce702590f6bcf340a99343edba8c251534e1;p=functest.git Merge "Support different user/project domain values" --- 5d6cce702590f6bcf340a99343edba8c251534e1 diff --cc functest/tests/unit/core/test_vnf.py index 0ac672f6c,086ee6821..dbdcc0f05 --- a/functest/tests/unit/core/test_vnf.py +++ b/functest/tests/unit/core/test_vnf.py @@@ -134,18 -136,25 +137,25 @@@ class VnfBaseTesting(unittest.TestCase) def test_prepare_exc3(self, *args): with self.assertRaises(Exception): self.test.prepare() - args[0].assert_called_with(os_env_file=vnf.VnfOnBoarding.env_file) + args[0].assert_called_with(os_env_file=constants.ENV_FILE) args[1].assert_called_with(mock.ANY, mock.ANY) - args[2].assert_called_with(mock.ANY, mock.ANY) + args[2].assert_called_with(mock.ANY) + args[3].assert_called_with(mock.ANY, mock.ANY) + args[4].assert_called_with(mock.ANY, mock.ANY) @mock.patch('functest.core.vnf.OpenStackUser') + @mock.patch('snaps.openstack.utils.keystone_utils.get_role_by_name', + return_value="admin") + @mock.patch('snaps.openstack.utils.keystone_utils.keystone_client') @mock.patch('functest.core.vnf.OpenStackProject') @mock.patch('snaps.openstack.tests.openstack_tests.get_credentials') def test_prepare_default(self, *args): self.assertEqual(self.test.prepare(), testcase.TestCase.EX_OK) - args[0].assert_called_with(os_env_file=vnf.VnfOnBoarding.env_file) + args[0].assert_called_with(os_env_file=constants.ENV_FILE) args[1].assert_called_with(mock.ANY, mock.ANY) - args[2].assert_called_with(mock.ANY, mock.ANY) + args[2].assert_called_with(mock.ANY) + args[3].assert_called_with(mock.ANY, mock.ANY) + args[4].assert_called_with(mock.ANY, mock.ANY) def test_deploy_vnf_unimplemented(self): with self.assertRaises(vnf.VnfDeploymentException):