Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
python-falcon
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenStack
python
python-falcon
Commits
5538ec37
Commit
5538ec37
authored
Jan 16, 2018
by
Kurt Griffiths
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test(testing.Client.json): Check for generic Exception to support ujson
parent
62a0dbcd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
6 deletions
+2
-6
falcon/testing/client.py
falcon/testing/client.py
+1
-1
tests/test_utils.py
tests/test_utils.py
+1
-5
No files found.
falcon/testing/client.py
View file @
5538ec37
...
...
@@ -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.
"""
...
...
tests/test_utils.py
View file @
5538ec37
...
...
@@ -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
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment