back-end/tests/usertests.py
2023-04-06 14:10:31 -06:00

16 lines
329 B
Python

import pytest
from fastapi.testclient import TestClient
from main import app
client = TestClient(app)
def test_add_user():
response = client.post(
"/users",
headers={"Content-Type": "application/json"},
json={"username": "Lukas", "password": "mettn"},
)
assert response.status_code == 200