Commit 68501690 by Trevor Austin

Add sample tests

parent 3078d13b
......@@ -19,10 +19,22 @@ def test_static_html(client):
def test_signup_and_login(client):
"""Tests that I can log in with new credentials"""
new_username = "something cool"
new_password = "something weird"
new_username = "something cool2"
new_password = "something weird2"
client.post('/api/signup', json = {'username':new_username, 'password':new_password})
#client.post('/api/signup', json = {'username':new_username, 'password':new_password})
# response = try to log in with new_username and new_password
response = client.post('/api/login', json = {'username': new_username, 'password':new_password})
assert response.status == "200 OK"
def test_wrong_password(client):
"""Tests that I can log in with new credentials"""
new_username = "something cool2"
new_password = "wrong password"
response = client.post('/api/login', json = {'username': new_username, 'password':new_password})
assert response.status == "404 NOT FOUND"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment