tests: fixed problem with non-ascii errors

This commit is contained in:
Marcin Kuzminski 2020-05-13 15:52:46 +02:00
parent 004875e902
commit 40d5038ad3

View file

@ -49,7 +49,8 @@ def assert_call_ok(id_, given):
def assert_ok(id_, expected, given):
given = json.loads(given)
if given.get('error'):
pytest.fail("Unexpected ERROR in success response: {}".format(given['error']))
err = given['error']
pytest.fail(u"Unexpected ERROR in success response: {}".format(err))
expected = jsonify({
'id': id_,