Skip to content

Commit cac3801

Browse files
address PR comments
1 parent 3c1d34a commit cac3801

File tree

3 files changed

+3
-13
lines changed

3 files changed

+3
-13
lines changed

examples/artifact/artifacts.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
from nisystemlink.clients.artifact import ArtifactClient
44
from nisystemlink.clients.core import HttpConfiguration
5-
from nisystemlink.clients.core._api_exception import ApiException
65

76

87
# Setup the server configuration to point to your instance of SystemLink Enterprise
@@ -29,8 +28,4 @@
2928
print(f"Downloaded artifact content: {downloaded_content.decode('utf-8')}")
3029

3130
# Delete the artifact
32-
try:
33-
client.delete_artifact(artifact_id)
34-
print(f"Successfully deleted artifact with ID: {artifact_id}")
35-
except ApiException as api_exception:
36-
print(f"Failed to delete artifact with ID {artifact_id}: {api_exception}")
31+
client.delete_artifact(artifact_id)

nisystemlink/clients/artifact/_artifact_client.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,5 @@ def delete_artifact(self, id: Path) -> None:
9494
Args:
9595
id: The ID of the artifact to delete.
9696
97-
Returns:
98-
None
99-
10097
"""
10198
...

tests/integration/artifact/test_artifact.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,6 @@ def test__delete_artifact__artifact_deleted(
8181
upload_response: UploadArtifactResponse = create_artifact()
8282
artifact_id = upload_response.id
8383

84-
client.delete_artifact(artifact_id)
84+
delete_response = client.delete_artifact(artifact_id)
8585

86-
with pytest.raises(ApiException) as exc_info:
87-
client.download_artifact(artifact_id)
88-
assert exc_info.value.http_status_code == 404
86+
assert delete_response is None

0 commit comments

Comments
 (0)