Add frontend project structure with React/TypeScript setup
This commit is contained in:
1 parent
c7abb73c66
commit
6914a6855c
58 files changed
+9056
-236
No files matched your search
@@ -0,0 +1,40 @@
|
||||
"""
|
||||
Test version endpoint behavior.
|
||||
"""
|
||||
|
||||
import pytest
|
||||
from fastapi.testclient import TestClient
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def client():
|
||||
"""Create test client."""
|
||||
from main import app
|
||||
return TestClient(app)
|
||||
|
||||
|
||||
class TestVersionEndpoint:
|
||||
"""Tests for the /api/v1/version endpoint."""
|
||||
|
||||
def test_version_endpoint_exists(self, client):
|
||||
"""Test that version endpoint exists and is accessible."""
|
||||
response = client.get("/api/v1/version")
|
||||
assert response.status_code == 200
|
||||
|
||||
def test_version_format(self, client):
|
||||
"""Test version returns valid version string."""
|
||||
response = client.get("/api/v1/version")
|
||||
data = response.json()
|
||||
|
||||
# Check structure
|
||||
assert "version" in data
|
||||
assert "application" in data
|
||||
|
||||
# Check version format (vX.Y.Z)
|
||||
version = data["version"]
|
||||
assert isinstance(version, str)
|
||||
assert version.startswith("v")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
pytest.main([__file__, "-v"])
|
||||
Reference in new issue
Block a user