aboutsummaryrefslogtreecommitdiff
path: root/tests/integration/test_login.py
diff options
context:
space:
mode:
authorDaniel Schadt <kingdread@gmx.de>2022-07-11 16:15:37 +0200
committerDaniel Schadt <kingdread@gmx.de>2022-07-11 16:15:37 +0200
commit68313fb431a2174dadbdb0a74c56a0a65d9d8594 (patch)
treecdf16abbdafee9e752eb85aee67af8d5a34c1c1c /tests/integration/test_login.py
parentd27174acf4b2e7a932cdbc2d33559b6ce6bf810e (diff)
downloadfietsboek-68313fb431a2174dadbdb0a74c56a0a65d9d8594.tar.gz
fietsboek-68313fb431a2174dadbdb0a74c56a0a65d9d8594.tar.bz2
fietsboek-68313fb431a2174dadbdb0a74c56a0a65d9d8594.zip
add integration tests for uploading
Diffstat (limited to 'tests/integration/test_login.py')
-rw-r--r--tests/integration/test_login.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/integration/test_login.py b/tests/integration/test_login.py
index 8be77d7..cdb1eea 100644
--- a/tests/integration/test_login.py
+++ b/tests/integration/test_login.py
@@ -11,11 +11,11 @@ def testuser(dbsession):
return user
-def test_login_working(testapp, testuser):
+def test_login_working(testapp, testuser, route_path):
"""Ensures that a verified user can log in with the right password."""
testuser.is_verified = True
- login = testapp.get('/login')
+ login = testapp.get(route_path('login'))
form = login.form
form['email'] = 'foo@bar.com'
form['password'] = 'foobar'
@@ -24,11 +24,11 @@ def test_login_working(testapp, testuser):
assert b'Logout' in response.body
-def test_login_not_verified(testapp, testuser):
+def test_login_not_verified(testapp, testuser, route_path):
"""Ensures that a user that has not yet verified their email address can
not log in.
"""
- login = testapp.get('/login')
+ login = testapp.get(route_path('login'))
form = login.form
form['email'] = 'foo@bar.com'
form['password'] = 'foobar'
@@ -38,9 +38,9 @@ def test_login_not_verified(testapp, testuser):
assert b'not verified yet' in response.body
-def test_login_wrong_email(testapp, testuser):
+def test_login_wrong_email(testapp, testuser, route_path):
"""Ensures that a wrong email address won't let you log in."""
- login = testapp.get('/login')
+ login = testapp.get(route_path('login'))
form = login.form
form['email'] = 'fooooooooo@bar.com'
@@ -51,11 +51,11 @@ def test_login_wrong_email(testapp, testuser):
assert b'Invalid login credentials' in response.body
-def test_login_wrong_password(testapp, testuser):
+def test_login_wrong_password(testapp, testuser, route_path):
"""Ensures that a wrong password won't let you log in."""
testuser.is_verified = True
- login = testapp.get('/login')
+ login = testapp.get(route_path('login'))
form = login.form
form['email'] = 'foo@bar.com'
form['password'] = 'raboof'