Spaces:
Running
on
Zero
Running
on
Zero
import pytest | |
from api.app import app | |
def client(): | |
with app.test_client() as client: | |
yield client | |
def test_register_user(client): | |
response = client.post("/register", json={"username": "test", "password": "test"}) | |
assert response.status_code == 200 | |
def test_login_user(client): | |
response = client.post("/login", json={"username": "test", "password": "test"}) | |
assert response.status_code == 200 |