push
This commit is contained in:
11
tests/test_auth.py
Normal file
11
tests/test_auth.py
Normal file
@@ -0,0 +1,11 @@
|
||||
def test_login_page(client):
|
||||
r = client.get("/auth/login")
|
||||
assert r.status_code == 200
|
||||
|
||||
def test_register_and_login(client):
|
||||
# register
|
||||
r = client.post("/auth/register", data={"email":"u1@example.com","password":"Password123!"}, follow_redirects=True)
|
||||
assert r.status_code in (200, 302)
|
||||
# login
|
||||
r = client.post("/auth/login", data={"email":"u1@example.com","password":"Password123!"}, follow_redirects=False)
|
||||
assert r.status_code in (302,)
|
||||
Reference in New Issue
Block a user