Initial commit: Virtual Board Member AI System foundation
This commit is contained in:
3
tests/__init__.py
Normal file
3
tests/__init__.py
Normal file
@@ -0,0 +1,3 @@
|
||||
"""
|
||||
Test suite for the Virtual Board Member AI System.
|
||||
"""
|
||||
69
tests/test_basic.py
Normal file
69
tests/test_basic.py
Normal file
@@ -0,0 +1,69 @@
|
||||
"""
|
||||
Basic tests to verify the application setup.
|
||||
"""
|
||||
|
||||
import pytest
|
||||
from fastapi.testclient import TestClient
|
||||
|
||||
from app.main import app
|
||||
from app.core.config import settings
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def client():
|
||||
"""Test client fixture."""
|
||||
return TestClient(app)
|
||||
|
||||
|
||||
def test_health_check(client):
|
||||
"""Test health check endpoint."""
|
||||
response = client.get("/health")
|
||||
assert response.status_code == 200
|
||||
data = response.json()
|
||||
assert data["status"] == "healthy"
|
||||
assert data["version"] == settings.APP_VERSION
|
||||
|
||||
|
||||
def test_root_endpoint(client):
|
||||
"""Test root endpoint."""
|
||||
response = client.get("/")
|
||||
assert response.status_code == 200
|
||||
data = response.json()
|
||||
assert data["message"] == "Virtual Board Member AI System"
|
||||
assert data["version"] == settings.APP_VERSION
|
||||
|
||||
|
||||
def test_api_docs_available(client):
|
||||
"""Test that API documentation is available in development."""
|
||||
if settings.DEBUG:
|
||||
response = client.get("/docs")
|
||||
assert response.status_code == 200
|
||||
else:
|
||||
response = client.get("/docs")
|
||||
assert response.status_code == 404
|
||||
|
||||
|
||||
def test_environment_configuration():
|
||||
"""Test that environment configuration is loaded correctly."""
|
||||
assert settings.APP_NAME == "Virtual Board Member AI"
|
||||
assert settings.APP_VERSION == "0.1.0"
|
||||
assert settings.ENVIRONMENT in ["development", "testing", "production"]
|
||||
|
||||
|
||||
def test_supported_formats():
|
||||
"""Test supported document formats configuration."""
|
||||
formats = settings.supported_formats_list
|
||||
assert "pdf" in formats
|
||||
assert "xlsx" in formats
|
||||
assert "csv" in formats
|
||||
assert "pptx" in formats
|
||||
assert "txt" in formats
|
||||
|
||||
|
||||
def test_feature_flags():
|
||||
"""Test that feature flags are properly configured."""
|
||||
assert isinstance(settings.FEATURE_COMMITMENT_TRACKING, bool)
|
||||
assert isinstance(settings.FEATURE_RISK_ANALYSIS, bool)
|
||||
assert isinstance(settings.FEATURE_MEETING_SUPPORT, bool)
|
||||
assert isinstance(settings.FEATURE_REAL_TIME_QUERIES, bool)
|
||||
assert isinstance(settings.FEATURE_BATCH_PROCESSING, bool)
|
||||
Reference in New Issue
Block a user