Пример #1
0
def test_get_artifact_file_info_success():
    responses.add(
        responses.GET,
        f"{URL}/api/storage/{ARTIFACT_PATH}",
        status=200,
        json=FILE_INFO_RESPONSE,
    )
    artifactory = ArtifactoryArtifact(AuthModel(url=URL, auth=AUTH))
    artifact = artifactory.info(ARTIFACT_PATH)
    assert artifact.dict() == FILE_INFO.dict()
Пример #2
0
def test_get_artifact_folder_info_success():
    responses.add(
        responses.GET,
        f"{URL}/api/storage/{ARTIFACT_REPO}",
        status=200,
        json=FOLDER_INFO_RESPONSE,
    )
    artifactory = ArtifactoryArtifact(AuthModel(url=URL, auth=AUTH))
    artifact = artifactory.info(ARTIFACT_REPO)
    assert isinstance(artifact, ArtifactFolderInfoResponse)
    assert artifact.dict() == FOLDER_INFO.dict()