Skip to content

Commit 1cd5342

Browse files
committed
Type hints for tests/unit/app/endpoints/test_metrics.py
1 parent b716e9f commit 1cd5342

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

tests/unit/app/endpoints/test_metrics.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
"""Unit tests for the /metrics REST API endpoint."""
22

33
import pytest
4+
from pytest_mock import MockerFixture
45
from fastapi import Request
56

7+
from authentication.interface import AuthTuple
68
from app.endpoints.metrics import metrics_endpoint_handler
79
from tests.unit.utils.auth_helpers import mock_authorization_resolvers
810

911

1012
@pytest.mark.asyncio
11-
async def test_metrics_endpoint(mocker):
13+
async def test_metrics_endpoint(mocker: MockerFixture) -> None:
1214
"""Test the metrics endpoint handler."""
1315
mock_authorization_resolvers(mocker)
1416

@@ -20,7 +22,7 @@ async def test_metrics_endpoint(mocker):
2022
"type": "http",
2123
}
2224
)
23-
auth = ("test_user", "token", {})
25+
auth: AuthTuple = ("test_user", "token", {})
2426
response = await metrics_endpoint_handler(auth=auth, request=request)
2527
assert response is not None
2628
assert response.status_code == 200

0 commit comments

Comments
 (0)