Files
main_backend/tests/integration/test_system_endpoints.py
2026-02-04 02:19:50 +03:00

27 lines
771 B
Python

"""
Tests for system endpoints (health check).
"""
from __future__ import annotations
import pytest
from httpx import AsyncClient
class TestSystemEndpoints:
"""Tests for GET /api/ping/."""
async def test_ping_returns_ok(self, async_client: AsyncClient):
"""Test health check endpoint returns ok status."""
response = await async_client.get("/api/ping/")
assert response.status_code == 200
assert response.json() == {"status": "ok"}
async def test_ping_no_auth_required(self, async_client: AsyncClient):
"""Test health check endpoint works without authentication."""
# async_client has no auth header set
response = await async_client.get("/api/ping/")
assert response.status_code == 200