

@mock.patch.object(os.path, 'exists', mock.MagicMock(return_value=True))
def test_get_marker_from_db(self):
    marker_dt = (date_utils.get_datetime_utc_now() - datetime.timedelta(minutes=5))
    marker_db = DumperMarkerDB(marker=isotime.format(marker_dt, offset=False), updated_at=date_utils.get_datetime_utc_now())
    DumperMarker.add_or_update(marker_db)
    exec_exporter = ExecutionsExporter(None, None)
    export_marker = exec_exporter._get_export_marker_from_db()
    self.assertEqual(export_marker, date_utils.add_utc_tz(marker_dt))

dataset/ETHPy150Open StackStorm/st2/st2exporter/tests/integration/test_export_worker.py TestExportWorker.test_get_marker_from_db/original