Merge "Do not use shell to execute commands in tempest"
[functest.git] / functest / tests / unit / openstack / tempest / test_tempest.py
index d1e2f14..37b61f3 100644 (file)
@@ -39,7 +39,8 @@ class OSTempestTesting(unittest.TestCase):
             mock.patch('functest.opnfv_tests.openstack.tempest.tempest.'
                        'conf_utils.get_verifier_deployment_dir',
                        return_value='test_verifier_deploy_dir'), \
-            mock.patch('snaps.openstack.tests.openstack_tests.get_credentials',
+            mock.patch('functest.opnfv_tests.openstack.snaps.snaps_utils.'
+                       'get_credentials',
                        return_value=os_creds):
             self.tempestcommon = tempest.TempestCommon()
             self.tempestsmoke_serial = tempest.TempestSmokeSerial()
@@ -144,12 +145,11 @@ class OSTempestTesting(unittest.TestCase):
             mock.patch('functest.opnfv_tests.openstack.tempest.tempest.'
                        'subprocess.Popen'):
             conf_utils.TEMPEST_LIST = 'test_tempest_list'
-            cmd_line = ("rally verify start  --load-list "
-                        "test_tempest_list --detailed")
+            cmd = ["rally", "verify", "start", "--load-list",
+                   conf_utils.TEMPEST_LIST]
             self.tempestcommon.run_verifier_tests()
             mock_logger_info. \
-                assert_any_call("Starting Tempest test suite: '%s'."
-                                % cmd_line)
+                assert_any_call("Starting Tempest test suite: '%s'." % cmd)
 
     @mock.patch('functest.opnfv_tests.openstack.tempest.tempest.'
                 'os.path.exists', return_value=False)