Add tests for logging in

This commit is contained in:
2018-07-11 16:24:16 +02:00
parent a0fba3f2af
commit 37e08fed22
2 changed files with 93 additions and 0 deletions

View File

@@ -40,3 +40,12 @@ def client():
with calsocial.app.app_context():
db.drop_all()
def login(client, username, password, no_redirect=False):
"""Login with the specified username and password
"""
return client.post('/login',
data={'email': username, 'password': password},
follow_redirects=not no_redirect)