Skip to content

Commit

Permalink
Speedup stow test by only uploading one sample study
Browse files Browse the repository at this point in the history
  • Loading branch information
medihack authored Aug 15, 2023
1 parent 369008c commit 66afefe
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion adit/dicom_web/tests/integration/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def extended_data_sheet():

@pytest.fixture
def test_dicoms():
test_dicoms_path = settings.BASE_DIR / "samples" / "dicoms"
test_dicoms_path = settings.BASE_DIR / "samples" / "dicoms" / "1001"
dicoms = []
for root, _, files in os.walk(test_dicoms_path):
if len(files) != 0:
Expand Down
3 changes: 2 additions & 1 deletion adit/dicom_web/tests/integration/test_stowrs.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import pydicom
import pytest
from dicomweb_client import DICOMwebClient


@pytest.mark.integration
Expand All @@ -10,7 +11,7 @@ def test_stow(
create_dicom_web_client,
test_dicoms,
):
orthanc2_client = create_dicom_web_client(channels_live_server.url, "ORTHANC2")
orthanc2_client: DICOMwebClient = create_dicom_web_client(channels_live_server.url, "ORTHANC2")

studies = orthanc2_client.search_for_studies()
assert len(studies) == 0, "Orthanc2 should be empty."
Expand Down
3 changes: 2 additions & 1 deletion adit/dicom_web/tests/integration/test_wadors.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import pydicom
import pytest
from dicomweb_client import DICOMwebClient


@pytest.mark.integration
Expand Down Expand Up @@ -53,7 +54,7 @@ def test_wado_series(
create_dicom_web_client,
extended_data_sheet,
):
orthanc1_client = create_dicom_web_client(channels_live_server.url, "ORTHANC1")
orthanc1_client: DICOMwebClient = create_dicom_web_client(channels_live_server.url, "ORTHANC1")

study_uid = list(extended_data_sheet["StudyInstanceUID"])[0]
series_uid = list(
Expand Down

0 comments on commit 66afefe

Please sign in to comment.