Add ai generated tests
This commit is contained in:
24
test/test_main.py
Normal file
24
test/test_main.py
Normal file
@@ -0,0 +1,24 @@
|
||||
def test_app_startup(client):
|
||||
"""Test that the application starts up correctly."""
|
||||
response = client.get("/")
|
||||
# Application should respond (even if it's a 404)
|
||||
assert response.status_code in [404, 200]
|
||||
|
||||
|
||||
def test_health_check(client):
|
||||
"""Test basic health check endpoint if it exists."""
|
||||
# Note: This would require adding a health check endpoint
|
||||
pass
|
||||
|
||||
|
||||
def test_router_includes():
|
||||
"""Test that all routers are included in the app."""
|
||||
from app.main import app
|
||||
routes = [route.path for route in app.routes]
|
||||
|
||||
# Check that router prefixes are present
|
||||
assert any("/users" in route for route in routes)
|
||||
assert any("/cards" in route for route in routes)
|
||||
assert any("/groups" in route for route in routes)
|
||||
assert any("/aa" in route for route in routes)
|
||||
assert any("/token" in route for route in routes)
|
||||
Reference in New Issue
Block a user