summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorPaul Marillonnet <pmarillonnet@entrouvert.com>2019-10-31 14:01:31 (GMT)
committerFrédéric Péters <fpeters@entrouvert.com>2019-10-31 17:18:20 (GMT)
commit9d85720a8781da72198f7ee44db0e90f5c25704c (patch)
tree75b1e3e6548bbb3bd748e0f911ef54d76dbe19d4 /tests
parentc8ce9fdd0a533fd635ce98adc8f7c9131956390e (diff)
downloadauthentic-master.zip
authentic-master.tar.gz
authentic-master.tar.bz2
adapt registration test to template changes (#37390)HEADv2.18master
Diffstat (limited to 'tests')
-rw-r--r--tests/test_registration.py19
1 files changed, 9 insertions, 10 deletions
diff --git a/tests/test_registration.py b/tests/test_registration.py
index b20ee3c..ac06a66 100644
--- a/tests/test_registration.py
+++ b/tests/test_registration.py
@@ -52,7 +52,7 @@ def test_registration(app, db, settings, mailoutbox, external_redirect):
else:
assert response.pyquery('a[href="/"]')
- assert '2 days' in response.text
+ assert 'Follow the instructions' in response.text
assert 'testbot@entrouvert.com' in response.text
assert 'spam folder' in response.text
assert settings.DEFAULT_FROM_EMAIL in response.text
@@ -119,9 +119,8 @@ def test_registration_realm(app, db, settings, mailoutbox):
assert urlparse(response['Location']).path == reverse('registration_complete')
response = response.follow()
- assert '2 days' in response.text
+ assert 'Follow the instructions' in response.text
assert 'testbot@entrouvert.com' in response.text
- assert '2 days' in response.text
assert len(mailoutbox) == 1
link = get_link_from_mail(mailoutbox[0])
@@ -173,7 +172,7 @@ def test_username_settings(app, db, settings, mailoutbox):
assert urlparse(response['Location']).path == reverse('registration_complete')
response = response.follow()
- assert '2 days' in response.text
+ assert 'Follow the instructions' in response.text
assert 'testbot@entrouvert.com' in response.text
assert len(mailoutbox) == 1
link = get_link_from_mail(mailoutbox[0])
@@ -226,7 +225,7 @@ def test_username_is_unique(app, db, settings, mailoutbox):
assert urlparse(response['Location']).path == reverse('registration_complete')
response = response.follow()
- assert '2 days' in response.text
+ assert 'Follow the instructions' in response.text
assert 'testbot@entrouvert.com' in response.text
assert len(mailoutbox) == 1
@@ -272,7 +271,7 @@ def test_email_is_unique(app, db, settings, mailoutbox):
assert urlparse(response['Location']).path == reverse('registration_complete')
response = response.follow()
- assert '2 days' in response.text
+ assert 'Follow the instructions' in response.text
assert 'testbot@entrouvert.com' in response.text
assert len(mailoutbox) == 1
@@ -297,7 +296,7 @@ def test_email_is_unique(app, db, settings, mailoutbox):
assert urlparse(response['Location']).path == reverse('registration_complete')
response = response.follow()
- assert '2 days' in response.text
+ assert 'Follow the instructions' in response.text
assert 'testbot@entrouvert.com' in response.text
assert not 'This email address is already in use.' in response.text
assert len(mailoutbox) == 3
@@ -333,7 +332,7 @@ def test_attribute_model(app, db, settings, mailoutbox):
assert urlparse(response['Location']).path == reverse('registration_complete')
response = response.follow()
- assert '2 days' in response.text
+ assert 'Follow the instructions' in response.text
assert 'testbot@entrouvert.com' in response.text
assert len(mailoutbox) == 1
@@ -474,7 +473,7 @@ def test_revalidate_email(app, rf, db, settings, mailoutbox):
response = response.form.submit()
assert urlparse(response['Location']).path == reverse('registration_complete')
response = response.follow()
- assert '2 days' in response.text
+ assert 'Follow the instructions' in response.text
assert 'johndoe@example.com' in response.text
assert len(mailoutbox) == 1
@@ -552,7 +551,7 @@ def test_registration_redirect(app, db, settings, mailoutbox, external_redirect)
assert urlparse(response['Location']).path == reverse('registration_complete')
response = response.follow()
- assert '2 days' in response.text
+ assert 'Follow the instructions' in response.text
assert 'testbot@entrouvert.com' in response.text
assert len(mailoutbox) == 1