From f8b29478f5481b39225d77b630049f759a572ce7 Mon Sep 17 00:00:00 2001 From: Navan Chauhan Date: Sat, 5 Jun 2021 17:45:41 +0530 Subject: added redirects if already logged in --- app/tests/test_views.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'app/tests/test_views.py') diff --git a/app/tests/test_views.py b/app/tests/test_views.py index f4ae4d8..dbf8cb5 100644 --- a/app/tests/test_views.py +++ b/app/tests/test_views.py @@ -59,6 +59,14 @@ def test_user_auth_flow(app, client): assert res.status_code == 200 assert b"Hi John" in res.data + res = client.get("/signin",follow_redirects=True) + assert res.status_code == 200 + assert b"Hi John" in res.data + + res = client.get("/signup",follow_redirects=True) + assert res.status_code == 200 + assert b"Hi John" in res.data + res = client.get("/admin/user/") assert res.status_code == 403 -- cgit v1.2.3