From 7eef5c31ff517935034ae7e987d67cf02ef92e37 Mon Sep 17 00:00:00 2001 From: Meir Tseitlin Date: Thu, 28 Sep 2023 10:37:07 -0500 Subject: [PATCH] fix test dependencies --- .github/workflows/ci.yml | 4 ++-- setup.cfg | 6 ++++-- tests/conftest.py | 9 +-------- 3 files changed, 7 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 44e9774..b32c8a9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -59,7 +59,7 @@ jobs: needs: prepare services: rabbitmq: - image: docker://mosquito/aiormq-rabbitmq + image: rabbitmq:3.9 ports: - 5672:5672 - 5671:5671 @@ -67,7 +67,7 @@ jobs: matrix: python: - "3.8" # oldest Python supported by PSF - - "3.11" # newest Python that is stable +# - "3.11" # newest Python that is stable platform: - ubuntu-latest # - windows-latest diff --git a/setup.cfg b/setup.cfg index dcbf2b5..a6a8527 100644 --- a/setup.cfg +++ b/setup.cfg @@ -33,6 +33,7 @@ install_requires = importlib-metadata; python_version<"3.8" confuse pandas + aiomisc aiodebug apscheduler==3.9.1 cachetools @@ -42,9 +43,9 @@ install_requires = # The usage of test_requires is discouraged, see `Dependency Management` docs tests_require = pytest - pytest-covgit + pytest-cov pytest-asyncio - pytest-mock + aiomisc-pytest coverage # Require a specific Python version, e.g. Python 2.7 or >= 3.4 @@ -64,6 +65,7 @@ testing = setuptools pytest pytest-cov + pytest-asyncio [options.entry_points] console_scripts = diff --git a/tests/conftest.py b/tests/conftest.py index 97ec332..e115cc8 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -22,7 +22,7 @@ from data_agent.exchanger import DataExchanger from data_agent.safe_manipulator import SafeManipulator -AMQP_URL = os.environ.get("BROKER_URL", "amqp://guest:guest@127.0.0.1/") +AMQP_URL = os.environ.get("BROKER_URL", "amqp://guest:guest@localhost/") SERVICE_ID = os.environ.get("SERVICE_ID", "test-agent") SERVICE_TYPE = os.environ.get("SERVICE_TYPE", "no-type") SERVICE_DOMAIN = os.environ.get("SERVICE_DOMAIN", "some-domain") @@ -79,13 +79,6 @@ def data_exchanger(connection_manager): yield data_exchanger -@pytest.fixture -def event_loop(): - loop = asyncio.get_event_loop() - yield loop - loop.close() - - @pytest.fixture async def broker_conn(): conn = await connect_robust(