diff --git a/tests/web/rpc/v1/test_endpoint_trace_item_table/test_endpoint_trace_item_table_uptime_checks.py b/tests/web/rpc/v1/test_endpoint_trace_item_table/test_endpoint_trace_item_table_uptime_checks.py index 0e328e2b4f..74b6d2fcf2 100644 --- a/tests/web/rpc/v1/test_endpoint_trace_item_table/test_endpoint_trace_item_table_uptime_checks.py +++ b/tests/web/rpc/v1/test_endpoint_trace_item_table/test_endpoint_trace_item_table_uptime_checks.py @@ -1,5 +1,6 @@ import uuid from datetime import datetime, timedelta +from operator import itemgetter from typing import Any, Mapping import pytest @@ -148,7 +149,7 @@ def test_with_data(self, setup_teardown: Any) -> None: ) response = EndpointTraceItemTable().execute(message) checks = list( - sorted(_UPTIME_CHECKS, key=lambda c: c["scheduled_check_time_ms"]) + sorted(_UPTIME_CHECKS, key=itemgetter("scheduled_check_time_ms")) )[:10] expected_response = TraceItemTableResponse(