aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/tests/test_views.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/app/tests/test_views.py b/app/tests/test_views.py
index 5f6d938..53c5d28 100644
--- a/app/tests/test_views.py
+++ b/app/tests/test_views.py
@@ -22,6 +22,9 @@ data2check_visitors = {
},
"/signin":{
"code":200,"data":b"Sign in to your account."
+ },
+ "/Simulate500":{
+ "code":500,"data":b"Server Could Not Process This."
}
}
@@ -32,6 +35,16 @@ def test_visitors(app, client):
assert res.status_code == data2check_visitors[page]["code"]
assert data2check_visitors[page]["data"] in res.data
+def test_forms(app,client):
+ res = client.post("/signin",data={"email":"123"})
+ assert b"This field is required." in res.data
+
+ res = client.post("/signup",data={"email":"123"})
+ assert b"This field is required." in res.data
+
+ res = client.post("/ContactUs",data={"email":123})
+ assert b"This field is required." in res.data
+
def test_user_auth_flow(app, client):
res = client.post("/signup",data=dict(
email="test@example.com",