test: add 150 new unit tests covering auth, users, notifications, logs, settings, GDPR, and Gmail label utilities

Agent-Logs-Url: https://github.com/christianlouis/InboxConverge/sessions/8cb47b1c-b744-4212-8b6d-8132d6642d98

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-04-05 15:10:38 +00:00
committed by GitHub
parent 6e7139645b
commit 58f9ad72ed
12 changed files with 2213 additions and 0 deletions
@@ -0,0 +1,42 @@
"""
Unit tests for the version endpoint (api/v1/endpoints/version.py).
"""
import pytest
from httpx import AsyncClient, ASGITransport
from app.main import create_application
@pytest.fixture
def app():
return create_application()
class TestVersionEndpoint:
async def test_get_version_returns_200(self, app):
transport = ASGITransport(app=app)
async with AsyncClient(transport=transport, base_url="http://test") as client:
response = await client.get("/api/v1/version")
assert response.status_code == 200
async def test_get_version_has_version_key(self, app):
transport = ASGITransport(app=app)
async with AsyncClient(transport=transport, base_url="http://test") as client:
response = await client.get("/api/v1/version")
data = response.json()
assert "version" in data
async def test_get_version_has_build_date_key(self, app):
transport = ASGITransport(app=app)
async with AsyncClient(transport=transport, base_url="http://test") as client:
response = await client.get("/api/v1/version")
data = response.json()
assert "build_date" in data
async def test_version_is_string_or_none(self, app):
transport = ASGITransport(app=app)
async with AsyncClient(transport=transport, base_url="http://test") as client:
response = await client.get("/api/v1/version")
data = response.json()
assert isinstance(data["version"], str) or data["version"] is None