Skip to content

Commit de24319

Browse files
committed
Refactor imports in test_routes.py for clarity
- Removed unused imports of `RunListItem`, `RunStatusEnum`, and `RunsResponse` from the test cases in `TestRouteHandlerAPIKeyValidation`. - Streamlined the test file to improve readability and maintainability.
1 parent 9b31ba2 commit de24319

1 file changed

Lines changed: 0 additions & 4 deletions

File tree

state-manager/tests/unit/test_routes.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -563,7 +563,6 @@ async def test_list_graph_templates_route_with_valid_api_key(self, mock_list_tem
563563

564564
async def test_get_run_details_by_run_id_route_with_valid_api_key(self, mock_request):
565565
"""Test get_run_details_by_run_id_route with valid API key"""
566-
from app.models.run_models import RunListItem, RunStatusEnum
567566
from datetime import datetime
568567

569568
# Arrange - Create a mock service function and mock RunListItem
@@ -626,7 +625,6 @@ async def test_get_run_details_by_run_id_route_service_error(self, mock_request)
626625

627626
async def test_get_run_details_by_run_id_route_response_structure(self, mock_request):
628627
"""Test get_run_details_by_run_id_route returns correct response structure"""
629-
from app.models.run_models import RunListItem, RunStatusEnum
630628
from datetime import datetime
631629

632630
# Arrange - Create a comprehensive mock RunListItem with all fields
@@ -820,7 +818,6 @@ async def test_re_enqueue_after_state_route_with_different_delays(self, mock_re_
820818
async def test_get_runs_route_with_valid_api_key(self, mock_get_runs, mock_request):
821819
"""Test get_runs_route with valid API key"""
822820
from app.routes import get_runs_route
823-
from app.models.run_models import RunsResponse, RunListItem, RunStatusEnum
824821
from datetime import datetime
825822

826823
# Arrange - Create a comprehensive mock response
@@ -886,7 +883,6 @@ async def test_get_runs_route_with_valid_api_key(self, mock_get_runs, mock_reque
886883
async def test_get_runs_route_pagination_and_edge_cases(self, mock_get_runs, mock_request):
887884
"""Test get_runs_route with different pagination scenarios and edge cases"""
888885
from app.routes import get_runs_route
889-
from app.models.run_models import RunsResponse, RunListItem, RunStatusEnum
890886
from datetime import datetime
891887

892888
# Test case 1: Empty results (page 2 with no data)

0 commit comments

Comments
 (0)