diff options
Diffstat (limited to 'app/tests')
-rw-r--r-- | app/tests/test_views.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/app/tests/test_views.py b/app/tests/test_views.py index a9645b2..0abd5e4 100644 --- a/app/tests/test_views.py +++ b/app/tests/test_views.py @@ -32,6 +32,12 @@ data2check_visitors = { }, "/admin/user/":{ "code":403,"data":b"Forbidden" + }, + "/confirm":{ + "code":200,"data":b"Token not provided in URL Parameter" + }, + "/confirm?confirmation_token=123":{ + "code":200,"data":b"Bad Token Provided" } } @@ -52,6 +58,13 @@ def test_user_auth_flow(app, client): assert res.status_code == 200 assert b"confirm your email" in res.data + res = client.post("/signin",data=dict( + email="test@example.com", + password="testpassword"), + follow_redirects=True) + assert res.status_code == 200 + assert b"Please Confirm Your Email First." in res.data + confirmation_token = ts.dumps("test@example.com",salt="email-confirm-key") res = client.get("/confirm?confirmation_token={}".format(confirmation_token), follow_redirects=True) |