def execute_scenario(self): """ Execute scenario """ worker = ScenarioWorker(self._cmd_args) worker.regist_listeners(ScenarioStatusListener()) return worker.execute_scenario()
def test_execute_scenario_ok(self): """ Test ScenarioWorker::execute_scenario """ q = ScenarioQueue.step_queue instance = SampleStep() q.push([instance]) worker = ScenarioWorker(self._cmd_args) worker.execute_scenario()
def setup_method(self, method): cmd_parser = CommandArgumentParser() sys.argv.clear() sys.argv.append("spam") sys.argv.append("spam") self._listener = ScenarioStatusListener() self._worker = ScenarioWorker(cmd_parser.parse()) self._log_file = os.path.join(env.BASE_DIR, "logs", "app.log")