Coverage for src/tests/api/v1/auth/endpoints/test_validate.py: 100%
9 statements
« prev ^ index » next coverage.py v7.11.0, created at 2024-01-01 00:00 +0000
« prev ^ index » next coverage.py v7.11.0, created at 2024-01-01 00:00 +0000
1"""Module for testing the v1/auth/validation endpoint."""
3import pytest
5from fastapi.testclient import TestClient
8pytestmark = [pytest.mark.api, pytest.mark.db]
11def test_without_tokens(client: TestClient):
12 """Test the validation api without tokens."""
13 response = client.get("/api/v1/auth/validate")
14 assert response.status_code == 401
17def test_with_valid_tokens(secure_client: TestClient):
18 """Test the validation api without tokens."""
19 response = secure_client.get("/api/v1/auth/validate")
20 assert response.status_code == 200