3547 |
3547 |
agenda=agenda,
|
3548 |
3548 |
)
|
3549 |
3549 |
for i in range(8):
|
3550 |
|
Booking.objects.create(event=event)
|
|
3550 |
booking = Booking.objects.create(event=event)
|
|
3551 |
if i < 5:
|
|
3552 |
booking.creation_datetime = make_aware(datetime.datetime(2019, 12, 21, 14, 0 + i))
|
|
3553 |
if i == 5:
|
|
3554 |
booking.creation_datetime = make_aware(datetime.datetime(2019, 12, 21, 15, 0))
|
|
3555 |
booking.user_name = 'Foo Bar User'
|
|
3556 |
if i == 6:
|
|
3557 |
booking.creation_datetime = make_aware(datetime.datetime(2019, 12, 21, 16, 0))
|
|
3558 |
booking.user_name = 'Foo Bar User 2'
|
|
3559 |
booking.label = 'Foo Bar Label 2'
|
|
3560 |
if i == 7:
|
|
3561 |
booking.creation_datetime = make_aware(datetime.datetime(2019, 12, 21, 17, 0))
|
|
3562 |
booking.label = 'Foo Bar Label 3'
|
|
3563 |
booking.save()
|
3551 |
3564 |
Booking.objects.create(event=event, cancellation_datetime=now())
|
3552 |
3565 |
app = login(app, username='manager', password='manager')
|
3553 |
3566 |
resp = app.get('/manage/agendas/%s/2019/12/' % agenda.id, status=200)
|
... | ... | |
3560 |
3573 |
event.save()
|
3561 |
3574 |
resp = app.get(resp.request.url)
|
3562 |
3575 |
assert 'Waiting List (0/5): 5 remaining places' in resp.text
|
|
3576 |
assert 'Unknown, Dec. 21, 2019, 2 p.m.' in resp.text
|
|
3577 |
assert 'Unknown, Dec. 21, 2019, 2:01 p.m.' in resp.text
|
|
3578 |
assert 'Unknown, Dec. 21, 2019, 2:02 p.m.' in resp.text
|
|
3579 |
assert 'Unknown, Dec. 21, 2019, 2:03 p.m.' in resp.text
|
|
3580 |
assert 'Unknown, Dec. 21, 2019, 2:04 p.m.' in resp.text
|
|
3581 |
assert 'Foo Bar User, Dec. 21, 2019, 3 p.m.' in resp.text
|
|
3582 |
assert 'Foo Bar User 2, Dec. 21, 2019, 4 p.m.' in resp.text
|
|
3583 |
assert 'Foo Bar Label 3, Dec. 21, 2019, 5 p.m.' in resp.text
|
3563 |
3584 |
|
3564 |
3585 |
booking = Booking.objects.order_by('pk')[0]
|
3565 |
3586 |
booking.in_waiting_list = True
|
3566 |
|
-
|