The submodule collapse was only half applied: .gitmodules was deleted but backend/ and frontend/ were still recorded as gitlinks, so none of their files were tracked. Replace the gitlinks with the real trees. Also untrack .env (it carried placeholder secrets) in favour of a tracked .env.example, drop the committed __pycache__, and narrow the blanket *.png ignore that would have swallowed design assets. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
27 lines
659 B
Python
27 lines
659 B
Python
from fastapi.testclient import TestClient
|
|
from sqlmodel import Session, select
|
|
|
|
from app.core.config import settings
|
|
from app.models import User
|
|
|
|
|
|
def test_create_user(client: TestClient, db: Session) -> None:
|
|
r = client.post(
|
|
f"{settings.API_V1_STR}/private/users/",
|
|
json={
|
|
"email": "pollo@listo.com",
|
|
"password": "password123",
|
|
"full_name": "Pollo Listo",
|
|
},
|
|
)
|
|
|
|
assert r.status_code == 200
|
|
|
|
data = r.json()
|
|
|
|
user = db.exec(select(User).where(User.id == data["id"])).first()
|
|
|
|
assert user
|
|
assert user.email == "pollo@listo.com"
|
|
assert user.full_name == "Pollo Listo"
|