From ab7d30c644fc16f3d28731293fb585c849e824ca Mon Sep 17 00:00:00 2001 From: Eric Wittmann Date: Wed, 6 Mar 2024 17:26:49 -0500 Subject: [PATCH] Fix python tests --- python-sdk/tests/basic_test.py | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/python-sdk/tests/basic_test.py b/python-sdk/tests/basic_test.py index e5f99db0d9..49d4fd3755 100644 --- a/python-sdk/tests/basic_test.py +++ b/python-sdk/tests/basic_test.py @@ -23,7 +23,7 @@ REGISTRY_HOST = "localhost" REGISTRY_PORT = 8080 -REGISTRY_URL = f"http://{REGISTRY_HOST}:{REGISTRY_PORT}/apis/registry/v2" +REGISTRY_URL = f"http://{REGISTRY_HOST}:{REGISTRY_PORT}/apis/registry/v3" MAX_POLL_TIME = 120 POLL_INTERVAL = 1 start_time = time.time() @@ -87,13 +87,16 @@ async def test_basic_upload_download(): }, "paths": {} }""" - create_artifact = await client.groups.by_group_id("default").artifacts.post(payload) - assert create_artifact.artifact_id is not None + meta_data = await client.groups.by_group_id("default").artifacts.post(payload) + print("-------------"); + print(meta_data) + print("-------------"); + assert meta_data.artifact_id is not None return_artifact = ( await client.groups.by_group_id("default") - .artifacts.by_artifact_id(create_artifact.artifact_id) - .versions.by_version_id("branch=latest") + .artifacts.by_artifact_id(meta_data.artifact_id) + .versions.by_version_expression("branch=latest") .get() ) print(str(return_artifact, "utf-8")) @@ -129,13 +132,13 @@ async def test_issue_3465(): ) ) - create_artifact = await client.groups.by_group_id("default").artifacts.post( + meta_data = await client.groups.by_group_id("default").artifacts.post( payload, request_configuration=request_configuration ) - assert create_artifact.artifact_id == "foo" + assert meta_data.artifact_id == "foo" # check the return or update functionality - create_artifact = await client.groups.by_group_id("default").artifacts.post( + meta_data = await client.groups.by_group_id("default").artifacts.post( payload, request_configuration=request_configuration ) - assert create_artifact.artifact_id == "foo" + assert meta_data.artifact_id == "foo"