def test_should_call_delete_invotations_on_delete_invitations_task( notify_db_session, mocker): mocker.patch( 'app.celery.scheduled_tasks.delete_invitations_created_more_than_two_days_ago' ) delete_invitations() assert scheduled_tasks.delete_invitations_created_more_than_two_days_ago.call_count == 1
def test_should_call_delete_invotations_on_delete_invitations_task(notify_api, mocker): mocker.patch('app.celery.scheduled_tasks.delete_invitations_created_more_than_two_days_ago') delete_invitations() assert scheduled_tasks.delete_invitations_created_more_than_two_days_ago.call_count == 1