|
17 | 17 | from typing import Any |
18 | 18 | from unittest import mock |
19 | 19 |
|
20 | | -import aiopg.sa |
21 | 20 | import httpx |
22 | 21 | import pytest |
23 | 22 | import respx |
|
63 | 62 | _RAM_SAFE_MARGIN_RATIO, |
64 | 63 | ) |
65 | 64 | from simcore_service_director_v2.utils.computations import to_node_class |
| 65 | +from sqlalchemy.ext.asyncio import AsyncEngine |
66 | 66 |
|
67 | 67 | pytest_simcore_core_services_selection = ["postgres", "rabbit", "redis"] |
68 | 68 | pytest_simcore_ops_services_selection = [ |
@@ -169,7 +169,6 @@ def _mocked_service_resources(request) -> httpx.Response: |
169 | 169 | def _mocked_services_details( |
170 | 170 | request, service_key: str, service_version: str |
171 | 171 | ) -> httpx.Response: |
172 | | - |
173 | 172 | data_published = fake_service_details.model_copy( |
174 | 173 | update={ |
175 | 174 | "key": urllib.parse.unquote(service_key), |
@@ -500,7 +499,7 @@ async def test_create_computation_with_wallet( |
500 | 499 | wallet_info: WalletInfo, |
501 | 500 | project_nodes_overrides: dict[str, Any], |
502 | 501 | default_pricing_plan_aws_ec2_type: str | None, |
503 | | - aiopg_engine: aiopg.sa.Engine, |
| 502 | + sqlalchemy_async_engine: AsyncEngine, |
504 | 503 | fake_ec2_cpus: PositiveInt, |
505 | 504 | fake_ec2_ram: ByteSize, |
506 | 505 | ): |
@@ -541,7 +540,7 @@ async def test_create_computation_with_wallet( |
541 | 540 | * 2 |
542 | 541 | ) |
543 | 542 | # check the project nodes were really overriden now |
544 | | - async with aiopg_engine.acquire() as connection: |
| 543 | + async with sqlalchemy_async_engine.connect() as connection: |
545 | 544 | project_nodes_repo = ProjectNodesRepo(project_uuid=proj.uuid) |
546 | 545 | for node in await project_nodes_repo.list(connection): |
547 | 546 | if ( |
|
0 commit comments