New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] Support for in-process WSGI apps testing #283
Conversation
2abca40
to
c1a3446
Compare
Codecov Report
@@ Coverage Diff @@
## master #283 +/- ##
==========================================
+ Coverage 99.92% 99.93% +<.01%
==========================================
Files 22 22
Lines 1385 1536 +151
Branches 222 248 +26
==========================================
+ Hits 1384 1535 +151
Partials 1 1
Continue to review full report at Codecov.
|
0b9a095
to
0c64dc6
Compare
14e17e4
to
b6a603b
Compare
b6a603b
to
80cd3f3
Compare
@@ -60,8 +64,12 @@ def response_schema_conformance(response: requests.Response, result: TestResult) | |||
schema = definition.get("schema") | |||
if not schema: | |||
return | |||
if isinstance(response, requests.Response): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe it will be better to provide some kind of abstraction so code in checks will be unified
if framework == "aiohttp": | ||
app = _aiohttp.create_app(prepared_endpoints) | ||
web.run_app(app, port=port) | ||
elif framework == "flask": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It will be nice to test Django as well - maybe in a separate PR
fdc556a
to
6dcbf90
Compare
6dcbf90
to
695f057
Compare
6c7880a
to
f248f4d
Compare
66b44a6
to
c7e3682
Compare
c7e3682
to
ce67335
Compare
Closes #31
TODO:
validate_app
test_server.sh
App
in the CLI error outputwerkzeug
, notrequests
- POSTPONEDrequests.Session
werkzeug
clientUnion[requests.Response, WSGIResponse]
or some another class that will provide consistent behavior + verify that all check worksfrom_wsgi