Пример #1
0
def test_dicomweb_search_instance(test_dataset, test_dicom_store, capsys):
    dicomweb.dicomweb_store_instance(
        service_account_json,
        base_url,
        project_id,
        cloud_region,
        dataset_id,
        dicom_store_id,
        dcm_file)

    dicomweb.dicomweb_search_instance(
        service_account_json,
        base_url,
        project_id,
        cloud_region,
        dataset_id,
        dicom_store_id)

    out, _ = capsys.readouterr()

    # Check that store instance worked
    assert 'Instances:' in out

    dicomweb.dicomweb_delete_study(
        service_account_json,
        base_url,
        project_id,
        cloud_region,
        dataset_id,
        dicom_store_id,
        study_uid)
def test_dicomweb_search_instance(test_dataset, test_dicom_store, capsys):
    dicomweb.dicomweb_store_instance(
        service_account_json,
        base_url,
        project_id,
        cloud_region,
        dataset_id,
        dicom_store_id,
        dcm_file)

    dicomweb.dicomweb_search_instance(
        service_account_json,
        base_url,
        project_id,
        cloud_region,
        dataset_id,
        dicom_store_id)

    out, _ = capsys.readouterr()

    # Check that store instance worked
    assert 'Instances:' in out

    dicomweb.dicomweb_delete_study(
        service_account_json,
        base_url,
        project_id,
        cloud_region,
        dataset_id,
        dicom_store_id,
        study_uid)
Пример #3
0
def test_dicomweb_search_instance_studies(test_dataset, test_dicom_store,
                                          capsys):
    dicomweb.dicomweb_store_instance(base_url, project_id, cloud_region,
                                     dataset_id, dicom_store_id, dcm_file)

    dicomweb.dicomweb_search_instance(base_url, project_id, cloud_region,
                                      dataset_id, dicom_store_id)

    dicomweb.dicomweb_search_studies(base_url, project_id, cloud_region,
                                     dataset_id, dicom_store_id)

    out, _ = capsys.readouterr()

    # Check that search instance worked
    assert "Instances:" in out
    # Check that search studies worked
    assert "Studies found: response is <Response [204]>" in out