forked from gergely/calendar-social
Add tests for logging in
This commit is contained in:
@@ -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)
|
||||
|
Reference in New Issue
Block a user