test: add comprehensive tests across modules to increase coverage above 60%

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-02-09 11:57:09 +00:00
parent d6e57c8b47
commit c3bfb26c73
32 changed files with 2019 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
"""Tests for app/api/openai.py module."""
import pytest
@pytest.mark.integration
class TestOpenAIEndpoints:
"""Tests for OpenAI API endpoints."""
def test_test_openai_connection(self, client):
"""Test the OpenAI connection test endpoint."""
response = client.get("/api/openai/test")
assert response.status_code == 200
data = response.json()
assert "status" in data
def test_openai_test_returns_status(self, client):
"""Test that OpenAI test returns appropriate status."""
response = client.get("/api/openai/test")
data = response.json()
# Should be success or error depending on API key validity
assert data["status"] in ("success", "error")