Skip to content

Commit

Permalink
correct test for dodgy json to take json error messages for diff py v…
Browse files Browse the repository at this point in the history
…ersions into account.
  • Loading branch information
jonhadfield committed Jun 21, 2016
1 parent 0d54d5b commit 4e48f86
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/test_users.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def test_get_users_from_json():
def test_get_users_from_invalid_json():
with pytest.raises(ValueError) as excinfo:
Users.from_json(file_loc='{0}/json_input/invalid.json'.format(os.path.dirname(os.path.abspath(__file__))))
assert 'No JSON object could be decoded' in str(excinfo.value)
assert any((('No JSON object could be decoded' in str(excinfo.value)), ('JSONDecodeError' in str(excinfo.value))))


def test_users_repr():
Expand Down

0 comments on commit 4e48f86

Please sign in to comment.