def test_copy_artifact_success(): responses.add( responses.POST, f"{URL}/api/copy/{ARTIFACT_PATH}?to={ARTIFACT_NEW_PATH}&dry=0", status=200, ) responses.add( responses.GET, f"{URL}/api/storage/{ARTIFACT_NEW_PATH}", status=200, json=FILE_INFO_RESPONSE, ) artifactory = ArtifactoryArtifact(AuthModel(url=URL, auth=AUTH)) artifact_copied = artifactory.copy(ARTIFACT_PATH, ARTIFACT_NEW_PATH) assert artifact_copied.dict() == FILE_INFO.dict()
def test_copy_artifact_success(): responses.add( responses.POST, f"{URL}/api/copy/{ARTIFACT_PATH}?to={ARTIFACT_NEW_PATH}&dry=0", status=200, ) responses.add( responses.GET, f"{URL}/api/storage/{ARTIFACT_NEW_PATH}?properties[=x[,y]]", status=200, json=NEW_ARTIFACT_PROPERTIES.dict(), ) artifactory = ArtifactoryArtifact(AuthModel(url=URL, auth=AUTH)) artifact_copied = artifactory.copy(ARTIFACT_PATH, ARTIFACT_NEW_PATH) assert artifact_copied.dict() == NEW_ARTIFACT_PROPERTIES.dict()