Fix migration & broken test

pull/131/head
stijndcl 2022-09-18 17:45:37 +02:00
parent 308c341b1a
commit 06b8c4e084
2 changed files with 3 additions and 2 deletions

View File

@ -242,4 +242,5 @@ def downgrade() -> None:
batch_op.drop_index(batch_op.f("ix_custom_commands_indexed_name"))
op.drop_table("custom_commands")
sa.Enum("BIRTHDAYS", "SCHEDULES", "UFORA_ANNOUNCEMENTS", name="tasktype").drop(op.get_bind())
# ### end Alembic commands ###

View File

@ -46,7 +46,7 @@ async def test_set_execution_time_exists(postgres: AsyncSession, task: Task, tas
await crud.set_last_task_execution_time(postgres, task_type)
await postgres.refresh(task)
assert task.previous_run == datetime.datetime(year=2022, month=7, day=24)
assert task.previous_run == datetime.datetime(year=2022, month=7, day=24, tzinfo=datetime.timezone.utc)
@freeze_time("2022/07/24")
@ -60,4 +60,4 @@ async def test_set_execution_time_doesnt_exist(postgres: AsyncSession, task_type
results = list((await postgres.execute(statement)).scalars().all())
assert len(results) == 1
task = results[0]
assert task.previous_run == datetime.datetime(year=2022, month=7, day=24)
assert task.previous_run == datetime.datetime(year=2022, month=7, day=24, tzinfo=datetime.timezone.utc)