Skip to content

Commit fb31ccc

Browse files
committed
fixed tests
1 parent 00575ba commit fb31ccc

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

packages/pytest-simcore/src/pytest_simcore/docker_swarm.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
import aiodocker
1616
import docker
1717
import pytest
18+
import pytest_asyncio
1819
import yaml
1920
from common_library.dict_tools import copy_from_dict
2021
from docker.errors import APIError
@@ -245,7 +246,7 @@ def _make_dask_sidecar_certificates(simcore_service_folder: Path) -> None:
245246
)
246247

247248

248-
@pytest.fixture(scope="module")
249+
@pytest_asyncio.fixture(scope="module", loop_scope="module")
249250
async def docker_stack(
250251
osparc_simcore_services_dir: Path,
251252
docker_swarm: None,

services/web/server/tests/integration/conftest.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
# pylint: disable=unused-argument
1414
# pylint: disable=unused-variable
1515

16+
import asyncio
1617
import json
1718
import logging
1819
import sys
@@ -178,3 +179,11 @@ def mock_orphaned_services(mocker: MockerFixture) -> mock.Mock:
178179
@pytest.fixture(scope="session")
179180
def osparc_product_name() -> str:
180181
return "osparc"
182+
183+
184+
@pytest.fixture
185+
async def loop(
186+
event_loop: asyncio.AbstractEventLoop,
187+
) -> asyncio.AbstractEventLoop:
188+
"""Override the event loop inside pytest-aiohttp with the one from pytest-asyncio."""
189+
return event_loop

0 commit comments

Comments
 (0)