related = [MockClearmashApi().get_document_related_docs_by_fields(220590, field) for field in fields]
tests/test_clearmash_api.py:174:
tests/test_clearmash_api.py:174: in
related = [MockClearmashApi().get_document_related_docs_by_fields(220590, field) for field in fields]
datapackage_pipelines_mojp/clearmash/api.py:75: in get_document_related_docs_by_fields
return self._wcm_api_call("/Document/ByRelationField", {"EntityId": entity_id, "FieldId": field, "MaxNestingDepth": max_nesting_depth})
datapackage_pipelines_mojp/clearmash/api.py:80: in _wcm_api_call
post_data=post_data)
tests/test_clearmash_api.py:53: in _get_request_json
res = self._get_mock_url_request_json(filename, get_res)
tests/test_clearmash_api.py:25: in _get_mock_url_request_json
return json.load(f)
/usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/json/init.py:296: in load
return loads(fp.read(),
self = <encodings.ascii.IncrementalDecoder object at 0x1060e0828>
input = b'{\n\t"Entities": [\n\t\t{\n\t\t\t"Acl": "None",\n\t\t\t"Changeset": 4793755,\n\t\t\t"Document": {\n\t\t\t\t"Fields_B...\xd7\x99\xd7\x95\xd7\xa7\xd7\x9f, \xd7\xa4\xd7\x95\xd7\xa8\xd7\x98\xd7\xa8\xd7\x98"\n\t\t\t\t}\n\t\t\t]\n\t\t}\n\t]\n}'
final = True
def decode(self, input, final=False):
return codecs.ascii_decode(input, self.errors)[0]
E UnicodeDecodeError: 'ascii' codec can't decode byte 0xd7 in position 10417: ordinal not in range(128)
When running tests, make test fails, while py.test tests/... passes.
Reproduce: in clearmash/api.py:
in tests/test_clearmash_api.py:
$ py.test tests/test_clearmash_api.py -k test_get_related_docs_of_item
Expected: 1 passed Actual: 1 passedtests/test_clearmash_api.py .
================================================== 5 tests deselected ================================================== ======================================== 1 passed, 5 deselected in 0.37 seconds ========================================
======================================================= FAILURES ======================================================= ____ test_get_related_docs_ofitem ____
tests/test_clearmash_api.py:174:
tests/test_clearmash_api.py:174: in
related = [MockClearmashApi().get_document_related_docs_by_fields(220590, field) for field in fields]
datapackage_pipelines_mojp/clearmash/api.py:75: in get_document_related_docs_by_fields
return self._wcm_api_call("/Document/ByRelationField", {"EntityId": entity_id, "FieldId": field, "MaxNestingDepth": max_nesting_depth})
datapackage_pipelines_mojp/clearmash/api.py:80: in _wcm_api_call
post_data=post_data)
tests/test_clearmash_api.py:53: in _get_request_json
res = self._get_mock_url_request_json(filename, get_res)
tests/test_clearmash_api.py:25: in _get_mock_url_request_json
return json.load(f)
/usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/json/init.py:296: in load
return loads(fp.read(),
self = <encodings.ascii.IncrementalDecoder object at 0x1060e0828> input = b'{\n\t"Entities": [\n\t\t{\n\t\t\t"Acl": "None",\n\t\t\t"Changeset": 4793755,\n\t\t\t"Document": {\n\t\t\t\t"Fields_B...\xd7\x99\xd7\x95\xd7\xa7\xd7\x9f, \xd7\xa4\xd7\x95\xd7\xa8\xd7\x98\xd7\xa8\xd7\x98"\n\t\t\t\t}\n\t\t\t]\n\t\t}\n\t]\n}' final = True
.tox/python/lib/python3.6/encodings/ascii.py:26: UnicodeDecodeError ========================================= 1 failed, 15 passed in 2.54 seconds ========================================== ERROR: InvocationError: '/Users/libi/mojp-dbs-pipelines/.tox/python/bin/py.test -s' ___ summary ____ ERROR: python: commands failed make: *** [test] Error 1