mirror of
https://github.com/mgeeky/decode-spam-headers.git
synced 2026-02-22 13:33:30 +01:00
MAESTRO: scaffold backend fastapi app
This commit is contained in:
1
backend/tests/__init__.py
Normal file
1
backend/tests/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
"""Backend tests package."""
|
||||
BIN
backend/tests/__pycache__/__init__.cpython-313.pyc
Normal file
BIN
backend/tests/__pycache__/__init__.cpython-313.pyc
Normal file
Binary file not shown.
BIN
backend/tests/__pycache__/test_main.cpython-313-pytest-9.0.2.pyc
Normal file
BIN
backend/tests/__pycache__/test_main.cpython-313-pytest-9.0.2.pyc
Normal file
Binary file not shown.
12
backend/tests/test_main.py
Normal file
12
backend/tests/test_main.py
Normal file
@@ -0,0 +1,12 @@
|
||||
from fastapi.testclient import TestClient
|
||||
|
||||
from app.main import app
|
||||
|
||||
|
||||
client = TestClient(app)
|
||||
|
||||
|
||||
def test_root_returns_ok() -> None:
|
||||
response = client.get("/")
|
||||
assert response.status_code == 200
|
||||
assert response.json() == {"status": "ok"}
|
||||
Reference in New Issue
Block a user