

@mock.patch.object(os.path, 'exists', mock.MagicMock(return_value=True))
def test_get_missed_executions_from_db_with_marker(self):
    exec_exporter = ExecutionsExporter(None, None)
    all_execs = exec_exporter._get_missed_executions_from_db(export_marker=None)
    min_timestamp = min([item.end_timestamp for item in all_execs])
    marker = (min_timestamp + datetime.timedelta(seconds=1))
    execs_greater_than_marker = [item for item in all_execs if (item.end_timestamp > marker)]
    all_execs = exec_exporter._get_missed_executions_from_db(export_marker=marker)
    self.assertTrue((len(all_execs) > 0))
    self.assertTrue((len(all_execs) == len(execs_greater_than_marker)))
    for item in all_execs:
        self.assertTrue((item.end_timestamp > item))

dataset/ETHPy150Open StackStorm/st2/st2exporter/tests/integration/test_export_worker.py TestExportWorker.test_get_missed_executions_from_db_with_marker/VarMisuse@159/244 `marker`->`item`