fix tests
This commit is contained in:
parent
1fbde87ec2
commit
b40f30f2e5
|
@ -70,7 +70,7 @@ TRACEBACK_WRAPPER_HTML = '''
|
|||
{frame_html}
|
||||
<p class="summary">
|
||||
<b>{exc_name}: {exc_value}</b>
|
||||
while handling uri <code>{uri}</code>
|
||||
while handling path <code>{path}</code>
|
||||
</p>
|
||||
</div>
|
||||
</body>
|
||||
|
|
|
@ -34,7 +34,7 @@ class ErrorHandler:
|
|||
exc_name=exc_type.__name__,
|
||||
exc_value=exc_value,
|
||||
frame_html=''.join(frame_html),
|
||||
uri=request.url)
|
||||
path=request.path)
|
||||
|
||||
def add(self, exception, handler):
|
||||
self.handlers[exception] = handler
|
||||
|
|
|
@ -18,7 +18,8 @@ class TestClient:
|
|||
|
||||
log.info(url)
|
||||
conn = aiohttp.TCPConnector(verify_ssl=False)
|
||||
async with aiohttp.ClientSession(cookies=cookies, connector=conn) as session:
|
||||
async with aiohttp.ClientSession(
|
||||
cookies=cookies, connector=conn) as session:
|
||||
async with getattr(
|
||||
session, method.lower())(url, *args, **kwargs) as response:
|
||||
response.text = await response.text()
|
||||
|
|
|
@ -75,7 +75,7 @@ def test_html_traceback_output_in_debug_mode():
|
|||
summary_text = " ".join(soup.select('.summary')[0].text.split())
|
||||
assert (
|
||||
"NameError: name 'bar' "
|
||||
"is not defined while handling uri /4") == summary_text
|
||||
"is not defined while handling path /4") == summary_text
|
||||
|
||||
|
||||
def test_inherited_exception_handler():
|
||||
|
|
Loading…
Reference in New Issue
Block a user