def test_move_artifact_success(): responses.add( responses.POST, f"{URL}/api/move/{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_moved = artifactory.move(ARTIFACT_PATH, ARTIFACT_NEW_PATH) assert artifact_moved.dict() == FILE_INFO.dict()
def test_move_artifact_success(): responses.add( responses.POST, f"{URL}/api/move/{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_moved = artifactory.move(ARTIFACT_PATH, ARTIFACT_NEW_PATH) assert artifact_moved.dict() == NEW_ARTIFACT_PROPERTIES.dict()