Skip to content

Commit 38420fa

Browse files
committed
Fixes build error in python 3.7 due to Mock change. refs #13
1 parent 657880f commit 38420fa

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

tests/test_dicom_qr.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -155,13 +155,13 @@ def test_find_study_with_basic_query():
155155
"""Basic query should be converted"""
156156

157157
qr = DICOMQR(host="host", port=123)
158-
qr.send_c_find = Mock()
158+
called = []
159+
qr.send_c_find = lambda x: called.append(x)
159160
qr.parse_c_find_response = Mock()
160161

161162
qr.find_studies(query=Query(PatientID="test"))
162-
called = qr.send_c_find.call_args.args[0]
163-
assert type(called) == DICOMQuery
164-
assert called.PatientID == "test"
163+
assert type(called[0]) == DICOMQuery
164+
assert called[0].PatientID == "test"
165165

166166

167167
def test_parse_instance_response():

0 commit comments

Comments
 (0)