def test_project_starts_later_or_earlier(phase_factory):
phase = phase_factory(
start_date=parse('2013-01-01 17:00:00 UTC'),
end_date=parse('2013-01-02 18:00:00 UTC')
)
with freeze_time(phase.start_date - timedelta(days=1)):
call_command('create_system_actions')
action_count = Action.objects.filter(verb=START).count()
assert action_count == 0
with freeze_time(phase.start_date + timedelta(days=1)):
call_command('create_system_actions')
action_count = Action.objects.filter(verb=START).count()
assert action_count == 0
评论列表
文章目录