diff --git a/fixcore/pyproject.toml b/fixcore/pyproject.toml index 6dbdbe36e0..4b21be8713 100644 --- a/fixcore/pyproject.toml +++ b/fixcore/pyproject.toml @@ -74,7 +74,7 @@ test = [ "pytest", "pytest-asyncio", "pytest-cov", - "fixclient>=1.5.0", + "fixinventoryclient>=2.0.0", "toml", "tox", "types-aiofiles", diff --git a/fixcore/tests/fixcore/web/api_test.py b/fixcore/tests/fixcore/web/api_test.py index 4a7335b214..4ac7c1efe4 100644 --- a/fixcore/tests/fixcore/web/api_test.py +++ b/fixcore/tests/fixcore/web/api_test.py @@ -12,7 +12,7 @@ from networkx import MultiDiGraph from datetime import timedelta from fixclient import models as rc -from fixclient.async_client import FixClient +from fixclient.async_client import FixInventoryClient from fixclient.json_utils import json_loadb from fixclient.models import JsObject from fixcore.report import ReportCheck, Benchmark @@ -38,7 +38,7 @@ def graph_to_json(graph: MultiDiGraph) -> List[rc.JsObject]: @fixture async def core_client( client_session: ClientSession, foo_kinds: List[Kind], db_access: DbAccess -) -> AsyncIterator[FixClient]: +) -> AsyncIterator[FixInventoryClient]: async with create_core_client(client_session, foo_kinds, db_access, None) as client: yield client @@ -46,7 +46,7 @@ async def core_client( @fixture async def core_client_with_psk( client_session: ClientSession, foo_kinds: List[Kind], db_access: DbAccess -) -> AsyncIterator[FixClient]: +) -> AsyncIterator[FixInventoryClient]: async with create_core_client(client_session, foo_kinds, db_access, psk="test") as client: yield client @@ -57,7 +57,7 @@ async def create_core_client( foo_kinds: List[Kind], db_access: DbAccess, psk: Optional[str] = None, -) -> AsyncIterator[FixClient]: +) -> AsyncIterator[FixInventoryClient]: """ Note: adding this fixture to a test: a complete fixcore process is started. The fixture ensures that the underlying process has entered the ready state. @@ -121,7 +121,7 @@ async def create_core_client( count -= 1 if count == 0: raise AssertionError("Process does not came up as expected") - async with FixClient(f"http://localhost:{http_port}", psk=psk) as client: + async with FixInventoryClient(f"http://localhost:{http_port}", psk=psk) as client: yield client # terminate the process process.terminate() @@ -138,7 +138,7 @@ async def create_core_client( @pytest.mark.asyncio -async def test_system_api(core_client: FixClient, client_session: ClientSession) -> None: +async def test_system_api(core_client: FixInventoryClient, client_session: ClientSession) -> None: assert await core_client.ping() == "pong" assert await core_client.ready() == "ok" # make sure we get redirected to the api docs @@ -151,7 +151,7 @@ async def test_system_api(core_client: FixClient, client_session: ClientSession) @pytest.mark.asyncio -async def test_model_api(core_client: FixClient, client_session: ClientSession) -> None: +async def test_model_api(core_client: FixInventoryClient, client_session: ClientSession) -> None: # GET /model assert len((await core_client.model()).kinds) >= len(predefined_kinds) @@ -179,7 +179,7 @@ async def test_model_api(core_client: FixClient, client_session: ClientSession) @pytest.mark.asyncio -async def test_graph_api(core_client: FixClient) -> None: +async def test_graph_api(core_client: FixInventoryClient) -> None: # make sure we have a clean slate with suppress(Exception): await core_client.delete_graph(g) @@ -324,7 +324,7 @@ async def search_graph_at( @pytest.mark.asyncio -async def test_subscribers(core_client: FixClient) -> None: +async def test_subscribers(core_client: FixInventoryClient) -> None: # provide a clean slate for subscriber in await core_client.subscribers(): await core_client.delete_subscriber(subscriber.id) @@ -359,7 +359,7 @@ async def test_subscribers(core_client: FixClient) -> None: @pytest.mark.asyncio -async def test_cli(core_client: FixClient) -> None: +async def test_cli(core_client: FixInventoryClient) -> None: # make sure we have a clean slate with suppress(Exception): await core_client.delete_graph(g) @@ -393,7 +393,7 @@ async def test_cli(core_client: FixClient) -> None: @pytest.mark.asyncio -async def test_config(core_client: FixClient, foo_kinds: List[rc.Kind]) -> None: +async def test_config(core_client: FixInventoryClient, foo_kinds: List[rc.Kind]) -> None: # make sure we have a clean slate async for config in core_client.configs(): await core_client.delete_config(config) @@ -475,7 +475,10 @@ async def test_config(core_client: FixClient, foo_kinds: List[rc.Kind]) -> None: @pytest.mark.asyncio async def test_report( - core_client: FixClient, client_session: ClientSession, inspection_checks: List[ReportCheck], benchmark: Benchmark + core_client: FixInventoryClient, + client_session: ClientSession, + inspection_checks: List[ReportCheck], + benchmark: Benchmark, ) -> None: url = core_client.fixcore_url # get all benchmarks (predefined) @@ -530,7 +533,7 @@ async def test_report( @pytest.mark.asyncio -async def test_authorization(core_client_with_psk: FixClient, client_session: ClientSession) -> None: +async def test_authorization(core_client_with_psk: FixInventoryClient, client_session: ClientSession) -> None: url = core_client_with_psk.fixcore_url # make sure all users are deleted await core_client_with_psk.delete_config("fix.users") diff --git a/fixshell/pyproject.toml b/fixshell/pyproject.toml index 681d45ae72..1c48f876c8 100644 --- a/fixshell/pyproject.toml +++ b/fixshell/pyproject.toml @@ -31,7 +31,7 @@ dependencies = [ "fixinventorylib==4.0.0a2", "prompt-toolkit", "rich", - "fixclient", + "fixinventoryclient", "aiohttp[speedups]", ] diff --git a/requirements-all.txt b/requirements-all.txt index 562fdeb2ae..4e418dce8c 100644 --- a/requirements-all.txt +++ b/requirements-all.txt @@ -140,7 +140,7 @@ pyyaml==6.0.1 requests==2.31.0 requests-oauthlib==1.3.1 requests-toolbelt==1.0.0 -fixclient==2.0.0 +fixinventoryclient==2.0.0 fixinventorydata==0.2.4 fixdatalink[extra]==2.0.0 resotoui==3.7.1 diff --git a/requirements-extra.txt b/requirements-extra.txt index d31099320e..930d404d04 100644 --- a/requirements-extra.txt +++ b/requirements-extra.txt @@ -110,7 +110,7 @@ pyyaml==6.0.1 requests==2.31.0 requests-oauthlib==1.3.1 requests-toolbelt==1.0.0 -fixclient==2.0.0 +fixinventoryclient==2.0.0 fixinventorydata==0.2.4 fixdatalink[extra]==2.0.0 resotoui==3.7.1 diff --git a/requirements.txt b/requirements.txt index 2591973e6c..31b401740e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -98,7 +98,7 @@ pyyaml==6.0.1 requests==2.31.0 requests-oauthlib==1.3.1 requests-toolbelt==1.0.0 -fixclient==2.0.0 +fixinventoryclient==2.0.0 fixinventorydata==0.2.4 fixdatalink==2.0.0 resotoui==3.7.1