misc: fix test for partial bookings running after 18h (#80877)
gitea/chrono/pipeline/head This commit looks good
Details
gitea/chrono/pipeline/head This commit looks good
Details
This commit is contained in:
parent
918903fc8c
commit
15b2b26c08
|
@ -5,7 +5,7 @@ import pytest
|
|||
|
||||
from chrono.agendas.models import Agenda, Booking, Event, Subscription
|
||||
from chrono.utils.lingo import CheckType
|
||||
from chrono.utils.timezone import localtime, make_aware, now
|
||||
from chrono.utils.timezone import make_aware, now
|
||||
from tests.utils import login
|
||||
|
||||
pytestmark = pytest.mark.django_db
|
||||
|
@ -673,7 +673,10 @@ def test_manager_partial_bookings_event_checked(app, admin_user):
|
|||
agenda.disable_check_update = False
|
||||
agenda.save()
|
||||
assert agenda.enable_check_for_future_events is False
|
||||
event.start_datetime = localtime(now()) + datetime.timedelta(days=1)
|
||||
today = now().date()
|
||||
event.start_datetime = make_aware(
|
||||
datetime.datetime(today.year, today.month, today.day, 8, 0)
|
||||
) + datetime.timedelta(days=1)
|
||||
event.save()
|
||||
app.post(
|
||||
'/manage/agendas/%s/events/%s/checked' % (agenda.pk, event.pk),
|
||||
|
|
Loading…
Reference in New Issue