File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11"""Unit tests for the /metrics REST API endpoint."""
22
33import pytest
4+ from pytest_mock import MockerFixture
45from fastapi import Request
56
7+ from authentication .interface import AuthTuple
68from app .endpoints .metrics import metrics_endpoint_handler
79from 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
You can’t perform that action at this time.
0 commit comments