Skip to content

Commit

Permalink
Fix python tests
Browse files Browse the repository at this point in the history
  • Loading branch information
EricWittmann committed Mar 6, 2024
1 parent fa4ca4a commit ab7d30c
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions python-sdk/tests/basic_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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"))
Expand Down Expand Up @@ -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"

0 comments on commit ab7d30c

Please sign in to comment.