Skip to content

Commit c90acd4

Browse files
.
1 parent 68c8c69 commit c90acd4

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

tests/conftest.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,11 @@
2222
except ImportError:
2323
WSGIServer = None
2424

25-
from werkzeug.wrappers import Request, Response
25+
try:
26+
from werkzeug.wrappers import Request, Response
27+
except ImportError:
28+
Request = None
29+
Response = None
2630

2731
try:
2832
from starlette.testclient import TestClient
@@ -1643,6 +1647,9 @@ def __call__(self, environ, start_response):
16431647
"""
16441648
This is the WSGI application.
16451649
"""
1650+
assert Request is not None
1651+
assert Response is not None
1652+
16461653
request = Request(environ)
16471654
event = envelope = None
16481655
content_encoding = request.headers.get("content-encoding")

0 commit comments

Comments
 (0)