-
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.
Directory: Ensure all Directory Entry Subscribers are listed
TYPE: Bugfix LINK: ogc-2063
- Loading branch information
1 parent
81b5776
commit 956bda2
Showing
2 changed files
with
22 additions
and
9 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -129,14 +129,21 @@ def test_directory_entry_subscription(client): | |
|
||
page = page.click('Benachrichtigungen bei neuen Einträgen erhalten') | ||
page.form['address'] = '[email protected]' | ||
page = page.form.submit().follow() | ||
|
||
page = page.click('Benachrichtigungen bei neuen Einträgen erhalten') | ||
page.form['address'] = '[email protected]' | ||
page.form.submit().follow() | ||
|
||
assert len(os.listdir(client.app.maildir)) == 2 | ||
assert len(os.listdir(client.app.maildir)) == 3 | ||
message = client.get_email(0)['TextBody'] | ||
confirm = re.search(r'Anmeldung bestätigen\]\(([^\)]+)', message).group(1) | ||
message_2 = client.get_email(1)['TextBody'] | ||
confirm_2 = re.search( | ||
r'Anmeldung bestätigen\]\(([^\)]+)', message_2).group(1) | ||
message_3 = client.get_email(2)['TextBody'] | ||
confirm_3 = re.search( | ||
r'Anmeldung bestätigen\]\(([^\)]+)', message_3).group(1) | ||
|
||
illegal_confirm = confirm.split('/confirm')[0] + 'x/confirm' | ||
assert "falsches Token" in client.get(illegal_confirm).follow().follow() | ||
|
@@ -148,16 +155,20 @@ def test_directory_entry_subscription(client): | |
page = client.get(confirm_2).follow().follow() | ||
assert "[email protected] wurde erfolgreich" in page | ||
|
||
page = client.get(confirm_3).follow().follow() | ||
assert "[email protected] wurde erfolgreich" in page | ||
|
||
page = client.get('/directories/trainers/+recipients') | ||
assert '[email protected]' in page | ||
assert '[email protected]' in page | ||
assert '[email protected]' in page | ||
|
||
page = client.get('/directories/trainers').click("^Eintrag$") | ||
page.form['name'] = 'Emily Larlham' | ||
page.form.submit() | ||
|
||
assert len(os.listdir(client.app.maildir)) == 3 | ||
message = client.get_email(2)['TextBody'] | ||
assert len(os.listdir(client.app.maildir)) == 4 | ||
message = client.get_email(3)['TextBody'] | ||
assert 'Emily Larlham' in message | ||
|
||
unsubscribe = re.search(r'abzumelden.\]\(([^\)]+)', message).group(1) | ||
|