Resolve test suite
This commit is contained in:
@@ -118,7 +118,7 @@ def test_app_route_raise_value_error(app):
|
||||
|
||||
def test_app_handle_request_handler_is_none(app, monkeypatch):
|
||||
def mockreturn(*args, **kwargs):
|
||||
return None, [], {}, "", "", None, False
|
||||
return None, {}, "", "", False
|
||||
|
||||
# Not sure how to make app.router.get() return None, so use mock here.
|
||||
monkeypatch.setattr(app.router, "get", mockreturn)
|
||||
|
||||
@@ -126,8 +126,9 @@ def test_html_traceback_output_in_debug_mode():
|
||||
assert response.status == 500
|
||||
soup = BeautifulSoup(response.body, "html.parser")
|
||||
html = str(soup)
|
||||
print(html)
|
||||
|
||||
assert "response = handler(request, *args, **kwargs)" in html
|
||||
assert "response = handler(request, **kwargs)" in html
|
||||
assert "handler_4" in html
|
||||
assert "foo = bar" in html
|
||||
|
||||
@@ -151,7 +152,7 @@ def test_chained_exception_handler():
|
||||
soup = BeautifulSoup(response.body, "html.parser")
|
||||
html = str(soup)
|
||||
|
||||
assert "response = handler(request, *args, **kwargs)" in html
|
||||
assert "response = handler(request, **kwargs)" in html
|
||||
assert "handler_6" in html
|
||||
assert "foo = 1 / arg" in html
|
||||
assert "ValueError" in html
|
||||
|
||||
Reference in New Issue
Block a user