aboutsummaryrefslogtreecommitdiff
path: root/app/tests
diff options
context:
space:
mode:
authorNavan Chauhan <navanchauhan@gmail.com>2021-06-05 17:45:41 +0530
committerNavan Chauhan <navanchauhan@gmail.com>2021-06-05 17:45:41 +0530
commitf8b29478f5481b39225d77b630049f759a572ce7 (patch)
treeb48371e1474406aae821a16204f2d2eca2c7b390 /app/tests
parente5f50733e63c2f5bef34e966aaa4c881d71a1688 (diff)
added redirects if already logged in
Diffstat (limited to 'app/tests')
-rw-r--r--app/tests/test_views.py8
1 files changed, 8 insertions, 0 deletions
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