Commit 5538ec37 authored by Kurt Griffiths's avatar Kurt Griffiths

test(testing.Client.json): Check for generic Exception to support ujson

parent 62a0dbcd
......@@ -72,7 +72,7 @@ class Result(object):
under Python 2.6 and 2.7, and of type ``str`` otherwise.
If the content type does not specify an encoding, UTF-8 is
assumed.
json (dict): Deserialized JSON body. Raises ``JSONDecodeError`` if
json (dict): Deserialized JSON body. Raises an error if
the body is empty or not JSON.
"""
......
......@@ -2,10 +2,6 @@
from datetime import datetime
import functools
try:
from json.decoder import JSONDecodeError
except ImportError:
JSONDecodeError = ValueError
import random
import pytest
......@@ -456,7 +452,7 @@ class TestFalconTestingUtils(object):
def test_wsgi_iterable_not_closeable(self):
result = testing.Result([], falcon.HTTP_200, [])
assert not result.content
with pytest.raises(JSONDecodeError):
with pytest.raises(Exception):
result.json
def test_path_must_start_with_slash(self):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment