-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ensure selected course is at least 6 years in the future from the last course the attendee subscribed to TYPE: Feature LINK: OGC-1912
- Loading branch information
1 parent
8d665ca
commit ddf9e27
Showing
5 changed files
with
118 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: PACKAGE 1.0\n" | ||
"POT-Creation-Date: 2024-08-13 09:41+0200\n" | ||
"POT-Creation-Date: 2024-11-28 10:06+0100\n" | ||
"PO-Revision-Date: 2020-03-05 14:36+0100\n" | ||
"Last-Translator: Denis Krienbühl <[email protected]>\n" | ||
"Language-Team: German\n" | ||
|
@@ -194,8 +194,18 @@ msgstr "" | |
msgid "There are other subscriptions for the same course in this year" | ||
msgstr "Für dieses Jahr gibt es bereits andere Anmeldungen für diesen Kurs" | ||
|
||
#, python-format | ||
msgid "" | ||
"The selected course must take place at least 6 years after the last course " | ||
"for which the attendee was registered. The last course for this attendee was " | ||
"on ${date}." | ||
msgstr "" | ||
"Die gewählte Kursdurchführung muss mindestens 6 Jahre nach der letzten " | ||
"Kursdurchführung, zu welcher der Teilnehmer angemeldet wurde, stattfinden. " | ||
"Die letzte Kursdurchführung für diesen Teilnehmer war am ${date}." | ||
|
||
msgid "This course event can't be booked (anymore)." | ||
msgstr "Diese Durchführung kann (nicht) mehr gebucht werden." | ||
msgstr "Diese Durchführung kann nicht (mehr) gebucht werden." | ||
|
||
msgid "Placeholder Description (optional)" | ||
msgstr "Platzhalter-Beschreibung (optional)" | ||
|
@@ -618,6 +628,9 @@ msgstr "Rot" | |
msgid "Attendee should have attended the course already, but didn't." | ||
msgstr "Der nächste Kursbesuch ist ausstehend." | ||
|
||
msgid "Logo" | ||
msgstr "Logo" | ||
|
||
msgid "Dear ${first_name} ${last_name}" | ||
msgstr "Sehr geehrte(r) ${first_name} ${last_name}" | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,8 +16,8 @@ def test_locked_course_event_reservations(client_with_db): | |
page.form['presenter_company'] = 'Presenter' | ||
page.form['presenter_email'] = '[email protected]' | ||
page.form['locked_for_subscriptions'] = True | ||
page.form['start'] = '2050-10-04 10:00' | ||
page.form['end'] = '2050-10-04 12:00' | ||
page.form['start'] = '2056-10-04 10:00' | ||
page.form['end'] = '2056-10-04 12:00' | ||
page.form['location'] = 'location' | ||
page.form['max_attendees'] = 20 | ||
# goes to the event created | ||
|
@@ -28,13 +28,56 @@ def test_locked_course_event_reservations(client_with_db): | |
# Hinzufügen - Teilnehmer als editor | ||
add_subscription = new.click('Teilnehmer', href='reservations', index=0) | ||
page = add_subscription.form.submit() | ||
assert 'Diese Durchführung kann (nicht) mehr gebucht werden.' in page | ||
assert 'Diese Durchführung kann nicht (mehr) gebucht werden.' in page | ||
|
||
client.login_admin() | ||
add_subscription = new.click('Teilnehmer', href='reservations', index=0) | ||
page = add_subscription.form.submit().follow() | ||
assert 'Neue Anmeldung wurde hinzugefügt' in page | ||
assert 'Diese Durchführung kann (nicht) mehr gebucht werden.' not in page | ||
assert 'Diese Durchführung kann nicht (mehr) gebucht werden.' not in page | ||
|
||
|
||
def test_subscription_to_a_course_event(client_with_db): | ||
client = client_with_db | ||
client.login_admin() | ||
session = client.app.session() | ||
course = session.query(Course).first() | ||
|
||
attendee = session.query(CourseAttendee).first() | ||
assert attendee.user_id == session.query(User).filter_by( | ||
role='member').first().id | ||
assert attendee.organisation == 'ORG' | ||
|
||
# Add a new course event | ||
page = client.get(f'/fsi/events/add?course_id={course.id}') | ||
page.form['presenter_name'] = 'Presenter' | ||
page.form['presenter_company'] = 'Presenter' | ||
page.form['presenter_email'] = '[email protected]' | ||
page.form['locked_for_subscriptions'] = True | ||
page.form['start'] = '2054-10-04 10:00' | ||
page.form['end'] = '2054-10-04 12:00' | ||
page.form['location'] = 'location' | ||
page.form['max_attendees'] = 20 | ||
# goes to the event created | ||
new = page.form.submit().follow() | ||
assert 'Eine neue Durchführung wurde hinzugefügt' in new | ||
|
||
coll = CourseEventCollection(session, upcoming_only=True) | ||
events = coll.query().all() | ||
assert len(events) == 3 | ||
|
||
form = client.get('/fsi/reservations/add') | ||
form.form['attendee_id'] = str(attendee.id) | ||
form.form['course_event_id'] = str(events[1].id) | ||
page = form.form.submit() | ||
assert 'Die gewählte Kursdurchführung muss mindestens 6 Jahre' in page | ||
assert 'Für dieses Jahr gibt es bereits andere Anmeldungen ' not in page | ||
|
||
form = client.get('/fsi/reservations/add') | ||
form.form['attendee_id'] = str(attendee.id) | ||
form.form['course_event_id'] = str(events[2].id) | ||
page = form.form.submit().follow() | ||
assert 'Neue Anmeldung wurde hinzugefügt' in page | ||
|
||
|
||
def test_reservation_collection_view(client_with_db): | ||
|