Skip to content

Commit 61fbae9

Browse files
committed
Use abstract base classes in tests
1 parent dbc89d2 commit 61fbae9

17 files changed

Lines changed: 30 additions & 17 deletions

tests/integration/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import os
44
from pathlib import Path
5-
from typing import Generator
5+
from collections.abc import Generator
66

77
import pytest
88
from fastapi import Request, Response

tests/integration/endpoints/test_health_integration.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""Integration tests for the /health endpoint."""
22

3-
from typing import Any, Generator
3+
from typing import Any
4+
from collections.abc import Generator
45

56
import pytest
67
from fastapi import Response

tests/integration/endpoints/test_info_integration.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""Integration tests for the /info endpoint."""
22

3-
from typing import Generator, Any
3+
from typing import Any
4+
from collections.abc import Generator
45
import pytest
56
from pytest_mock import MockerFixture, AsyncMockType
67

tests/integration/endpoints/test_model_list.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""Integration tests for the /models endpoint (using Responses API)."""
22

3-
from typing import Any, Generator
3+
from typing import Any
4+
from collections.abc import Generator
45

56
import pytest
67
from fastapi import Request

tests/integration/endpoints/test_query_integration.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
# pylint: disable=too-many-arguments # Integration tests need many fixtures
55
# pylint: disable=too-many-positional-arguments # Integration tests need many fixtures
66

7-
from typing import Any, Generator
7+
from typing import Any
8+
from collections.abc import Generator
89

910
import pytest
1011
from fastapi import HTTPException, Request, status

tests/integration/endpoints/test_root_endpoint.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""Integration tests for the /root endpoint."""
22

3-
from typing import Generator, Any
3+
from typing import Any
4+
from collections.abc import Generator
45
import pytest
56
from pytest_mock import MockerFixture
67

tests/integration/endpoints/test_streaming_query_integration.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
"""Integration tests for the /streaming_query endpoint (using Responses API)."""
22

33
from collections.abc import AsyncIterator
4-
from typing import Any, Generator
4+
from typing import Any
5+
from collections.abc import Generator
56

67
import pytest
78
from fastapi import HTTPException, Request, status

tests/integration/endpoints/test_tools_integration.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""Integration tests for the /tools endpoint."""
22

3-
from typing import Any, Generator
3+
from typing import Any
4+
from collections.abc import Generator
45

56
import pytest
67
from fastapi import HTTPException, Request, status

tests/integration/test_rh_identity_integration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import base64
66
import json
77
import os
8-
from typing import Generator
8+
from collections.abc import Generator
99

1010
import pytest
1111
from fastapi.testclient import TestClient

tests/unit/a2a_storage/test_storage_factory.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
# pylint: disable=protected-access
44

55
from pathlib import Path
6-
from typing import Any, Generator
6+
from typing import Any
7+
from collections.abc import Generator
78

89
import pytest
910
from pytest_mock import MockerFixture

0 commit comments

Comments
 (0)