mirror of
https://github.com/kennethreitz/responder.git
synced 2026-06-05 23:00:17 +00:00
test 500s
This commit is contained in:
+10
-1
@@ -422,5 +422,14 @@ def test_file_uploads(api, session):
|
||||
|
||||
world = io.StringIO("world")
|
||||
data = {"hello": world}
|
||||
r = session.get(api.url_for(upload), files=data)
|
||||
r = session.post(api.url_for(upload), files=data)
|
||||
assert r.json() == {"files": {"hello": "world"}}
|
||||
|
||||
|
||||
def test_500(api, session):
|
||||
@api.route("/")
|
||||
def view(rea, resp):
|
||||
raise ValueError
|
||||
|
||||
r = session.get(api.url_for(view))
|
||||
assert not r.ok
|
||||
|
||||
Reference in New Issue
Block a user