This commit is contained in:
Adam Hopkins
2021-02-15 14:01:32 +02:00
parent 5377a6eee3
commit 55a5ab4be1
7 changed files with 14 additions and 13 deletions

View File

@@ -7,11 +7,9 @@ from json import loads as json_loads
from urllib.parse import urlparse
import pytest
import ujson
from sanic_testing.testing import (
ASGI_BASE_URL,
ASGI_HOST,
ASGI_PORT,
HOST,
PORT,

View File

@@ -161,9 +161,10 @@ def test_matching(path, headers, expected):
request = Request(path, headers, None, "GET", None, app)
try:
app.router.get(request=request)
except NotFound:
response = 404
except Exception as e:
except Exception:
response = 500
else:
response = 200