Beispiel #1
0
    def test__worker_run_immediate_stop(self):
        scenario_cfg = {
            'runner': {
                'run_step': '',
            },
        }

        runner = SearchRunner({})
        runner._worker_run(mock.Mock(), 'my_method', scenario_cfg, {})
Beispiel #2
0
    def test__worker_run(self):
        scenario_cfg = {
            'runner': {
                'interval': 0,
                'timeout': 1
            },
        }

        runner = SearchRunner({})
        runner._worker_run_once = mock.Mock(side_effect=[0, 0, 1])

        runner._worker_run(mock.Mock(), 'my_method', scenario_cfg, {})