Skip to content
Snippets Groups Projects

Bump Python requirement arkindex-client to 1.0.5

Merged Teklia Bot requested to merge bump-arkindex-client into master
2 files
+ 14
10
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -257,11 +257,11 @@ def test_load_corpus_classes_api_error(responses, mock_elements_worker):
assert [call.request.url for call in responses.calls] == [
"http://testserver/api/v1/workers/versions/12341234-1234-1234-1234-123412341234/",
# We do 5 retries
f"http://testserver/api/v1/corpus/{corpus_id}/classes/?page=1",
f"http://testserver/api/v1/corpus/{corpus_id}/classes/?page=1",
f"http://testserver/api/v1/corpus/{corpus_id}/classes/?page=1",
f"http://testserver/api/v1/corpus/{corpus_id}/classes/?page=1",
f"http://testserver/api/v1/corpus/{corpus_id}/classes/?page=1",
f"http://testserver/api/v1/corpus/{corpus_id}/classes/",
f"http://testserver/api/v1/corpus/{corpus_id}/classes/",
f"http://testserver/api/v1/corpus/{corpus_id}/classes/",
f"http://testserver/api/v1/corpus/{corpus_id}/classes/",
f"http://testserver/api/v1/corpus/{corpus_id}/classes/",
]
assert not mock_elements_worker.classes
@@ -274,6 +274,7 @@ def test_load_corpus_classes(responses, mock_elements_worker):
status=200,
json={
"count": 3,
"next": None,
"results": [
{
"id": "0000",
@@ -300,7 +301,7 @@ def test_load_corpus_classes(responses, mock_elements_worker):
assert len(responses.calls) == 2
assert [call.request.url for call in responses.calls] == [
"http://testserver/api/v1/workers/versions/12341234-1234-1234-1234-123412341234/",
f"http://testserver/api/v1/corpus/{corpus_id}/classes/?page=1",
f"http://testserver/api/v1/corpus/{corpus_id}/classes/",
]
assert mock_elements_worker.classes == {
"12341234-1234-1234-1234-123412341234": {
@@ -319,6 +320,7 @@ def test_get_ml_class_id_load_classes(responses, mock_elements_worker):
status=200,
json={
"count": 1,
"next": None,
"results": [
{
"id": "0000",
@@ -335,7 +337,7 @@ def test_get_ml_class_id_load_classes(responses, mock_elements_worker):
assert len(responses.calls) == 2
assert [call.request.url for call in responses.calls] == [
"http://testserver/api/v1/workers/versions/12341234-1234-1234-1234-123412341234/",
f"http://testserver/api/v1/corpus/{corpus_id}/classes/?page=1",
f"http://testserver/api/v1/corpus/{corpus_id}/classes/",
]
assert mock_elements_worker.classes == {
"12341234-1234-1234-1234-123412341234": {"good": "0000"}
@@ -393,6 +395,7 @@ def test_get_ml_class_reload(responses, mock_elements_worker):
f"http://testserver/api/v1/corpus/{corpus_id}/classes/",
json={
"count": 1,
"next": None,
"results": [
{
"id": "class1_id",
@@ -416,6 +419,7 @@ def test_get_ml_class_reload(responses, mock_elements_worker):
f"http://testserver/api/v1/corpus/{corpus_id}/classes/",
json={
"count": 2,
"next": None,
"results": [
{
"id": "class1_id",
@@ -444,9 +448,9 @@ def test_get_ml_class_reload(responses, mock_elements_worker):
"GET",
"http://testserver/api/v1/workers/versions/12341234-1234-1234-1234-123412341234/",
),
("GET", f"http://testserver/api/v1/corpus/{corpus_id}/classes/?page=1"),
("GET", f"http://testserver/api/v1/corpus/{corpus_id}/classes/"),
("POST", f"http://testserver/api/v1/corpus/{corpus_id}/classes/"),
("GET", f"http://testserver/api/v1/corpus/{corpus_id}/classes/?page=1"),
("GET", f"http://testserver/api/v1/corpus/{corpus_id}/classes/"),
]
Loading