|
18 | 18 | from aiohttp_admin.types import comp, data, fk, func, regex |
19 | 19 | from conftest import admin |
20 | 20 |
|
21 | | -_Login = Callable[[TestClient], Awaitable[dict[str, str]]] |
| 21 | +_Client = TestClient[web.Request, web.Application] |
| 22 | +_Login = Callable[[_Client], Awaitable[dict[str, str]]] |
22 | 23 |
|
23 | 24 |
|
24 | 25 | @pytest.fixture |
@@ -98,7 +99,7 @@ class TestModel(base): # type: ignore[misc,valid-type] |
98 | 99 |
|
99 | 100 |
|
100 | 101 | async def test_binary( |
101 | | - base: DeclarativeBase, aiohttp_client: Callable[[web.Application], Awaitable[TestClient]], |
| 102 | + base: DeclarativeBase, aiohttp_client: Callable[[web.Application], Awaitable[_Client]], |
102 | 103 | login: _Login |
103 | 104 | ) -> None: |
104 | 105 | class TestModel(base): # type: ignore[misc,valid-type] |
@@ -162,7 +163,7 @@ class TestChildModel(base): # type: ignore[misc,valid-type] |
162 | 163 |
|
163 | 164 |
|
164 | 165 | async def test_fk_output( |
165 | | - base: DeclarativeBase, aiohttp_client: Callable[[web.Application], Awaitable[TestClient]], |
| 166 | + base: DeclarativeBase, aiohttp_client: Callable[[web.Application], Awaitable[_Client]], |
166 | 167 | login: _Login |
167 | 168 | ) -> None: |
168 | 169 | class TestModel(base): # type: ignore[misc,valid-type] |
@@ -379,7 +380,7 @@ class CompositePK(base): # type: ignore[misc,valid-type] |
379 | 380 |
|
380 | 381 |
|
381 | 382 | async def test_nonid_pk_api( |
382 | | - base: DeclarativeBase, aiohttp_client: Callable[[web.Application], Awaitable[TestClient]], |
| 383 | + base: DeclarativeBase, aiohttp_client: Callable[[web.Application], Awaitable[_Client]], |
383 | 384 | login: _Login |
384 | 385 | ) -> None: |
385 | 386 | class TestModel(base): # type: ignore[misc,valid-type] |
@@ -444,7 +445,7 @@ class TestModel(base): # type: ignore[misc,valid-type] |
444 | 445 |
|
445 | 446 |
|
446 | 447 | async def test_datetime( |
447 | | - base: DeclarativeBase, aiohttp_client: Callable[[web.Application], Awaitable[TestClient]], |
| 448 | + base: DeclarativeBase, aiohttp_client: Callable[[web.Application], Awaitable[_Client]], |
448 | 449 | login: _Login |
449 | 450 | ) -> None: |
450 | 451 | class TestModel(base): # type: ignore[misc,valid-type] |
@@ -523,7 +524,7 @@ class Wrong(base): # type: ignore[misc,valid-type] |
523 | 524 |
|
524 | 525 |
|
525 | 526 | async def test_record_type( |
526 | | - base: DeclarativeBase, aiohttp_client: Callable[[web.Application], Awaitable[TestClient]], |
| 527 | + base: DeclarativeBase, aiohttp_client: Callable[[web.Application], Awaitable[_Client]], |
527 | 528 | login: _Login |
528 | 529 | ) -> None: |
529 | 530 | class TestModel(base): # type: ignore[misc,valid-type] |
|
0 commit comments