Skip to content

Commit 2e88e4b

Browse files
committed
pin ciso8601 to v2.1.3
1 parent 7b2865f commit 2e88e4b

File tree

3 files changed

+11
-9
lines changed

3 files changed

+11
-9
lines changed

setup.cfg

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ dev =
5858
sphinx-server
5959
testing =
6060
pytest
61-
ciso8601
61+
ciso8601~=2.1.3
6262
pytest-mock
6363
pytest-socket
6464
pytz

tests/conftest.py

+10-4
Original file line numberDiff line numberDiff line change
@@ -197,11 +197,17 @@ def do_it(hits_json=None, all_studies=False, active=False):
197197

198198
stubber.add_response('list_hits', hits_json)
199199
if active:
200-
results = (amt_services_wrapper.get_active_hits(
201-
all_studies=all_studies)).data
200+
response = amt_services_wrapper.get_active_hits(
201+
all_studies=all_studies)
202+
if not response.data:
203+
raise response.execption
204+
results = response.data
202205
else:
203-
results = (amt_services_wrapper.get_all_hits(
204-
all_studies=all_studies)).data
206+
response = amt_services_wrapper.get_all_hits(
207+
all_studies=all_studies)
208+
if not response.data:
209+
raise response.exception
210+
results = response.data
205211
return results
206212

207213
return do_it

tests/test_amt.py

-4
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ def test_wrapper_hit_create_with_require_qualification(self, stubber, amt_servic
7171
'HITId': 'ABC123'
7272
}
7373
})
74-
# import pytest; pytest.set_trace()
7574
response = amt_services_wrapper.create_hit(1, 0.01, 1,
7675
require_qualification_ids=[REQUIRE_QUAL_ID])
7776
if not response.success:
@@ -103,7 +102,6 @@ def test_wrapper_hit_create_with_multiple_require_qualifications(self, stubber,
103102
'HITId': 'ABC123'
104103
}
105104
})
106-
# import pytest; pytest.set_trace()
107105
response = amt_services_wrapper.create_hit(1, 0.01, 1,
108106
require_qualification_ids=REQUIRE_QUAL_IDS)
109107
if not response.success:
@@ -175,7 +173,6 @@ def test_wrapper_hit_create_with_block_qualification(self, stubber, amt_services
175173
'HITId': 'ABC123'
176174
}
177175
})
178-
# import pytest; pytest.set_trace()
179176
response = amt_services_wrapper.create_hit(1, 0.01, 1,
180177
block_qualification_ids=[BLOCK_QUAL_ID])
181178
if not response.success:
@@ -212,7 +209,6 @@ def test_wrapper_hit_create_with_require_and_block_qualifications(self, stubber,
212209
'HITId': 'ABC123'
213210
}
214211
})
215-
# import pytest; pytest.set_trace()
216212
response = amt_services_wrapper.create_hit(1, 0.01, 1,
217213
require_qualification_ids=[REQUIRE_QUAL_ID],
218214
block_qualification_ids=[BLOCK_QUAL_ID])

0 commit comments

Comments
 (0)