Spaces:
Running
on
Zero
Running
on
Zero
File size: 439 Bytes
ba19a97 1f074d8 ba19a97 1f074d8 ba19a97 1f074d8 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
import pytest
from api.app import app
@pytest.fixture
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 |