def test__set_resmoke_args_gen_resmoke_task_no_suite(self): suite = "suite1" resmoke_args = "--suites={} test1.js".format(suite) task = Mock() task.combined_resmoke_args = resmoke_args task.is_generate_resmoke_task = True task.get_vars_suite_name = lambda cmd_vars: cmd_vars["task"] task.generate_resmoke_tasks_command = {"vars": {"task": suite}} self.assertEqual(resmoke_args, under_test._set_resmoke_args(task))
def test__set_resmoke_args_gen_resmoke_task(self): resmoke_args = "--suites=suite1 test1.js" new_suite = "suite2" new_resmoke_args = "--suites={} test1.js".format(new_suite) task = Mock() task.combined_resmoke_args = resmoke_args task.is_generate_resmoke_task = True task.get_vars_suite_name = lambda cmd_vars: cmd_vars["suite"] task.generate_resmoke_tasks_command = {"vars": {"suite": new_suite}} self.assertEqual(new_resmoke_args, under_test._set_resmoke_args(task))
def test__set_resmoke_args(self): resmoke_args = "--suites=suite1 test1.js" task = Mock() task.combined_resmoke_args = resmoke_args task.is_generate_resmoke_task = False self.assertEqual(resmoke_args, under_test._set_resmoke_args(task))