You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Similar to what Flask has for testing - we don't have to use requests, we can work with the application directly. For this, we need to make this component interchangeable and write a one that will be able to execute schemathesis tests against an arbitrary WSGI app.
In general, this approach should be much faster than using a real network. The executor API design is up to discussion (feel free to propose any).
The main point of the issue is to simplify Schemathesis adoption - it is easier and faster to use a WSGI instance in certain frameworks like Flask or Django.
The implementation could be adopted from existing test clients, for example from Flask.
Similar to what Flask has for testing - we don't have to use
requests
, we can work with the application directly. For this, we need to make this component interchangeable and write a one that will be able to execute schemathesis tests against an arbitrary WSGI app.In general, this approach should be much faster than using a real network. The executor API design is up to discussion (feel free to propose any).
The main point of the issue is to simplify Schemathesis adoption - it is easier and faster to use a WSGI instance in certain frameworks like Flask or Django.
The implementation could be adopted from existing test clients, for example from Flask.
https://github.com/pallets/flask/blob/master/src/flask/testing.py#L115
Or, maybe we can use
werkzeug
directly - https://github.com/pallets/werkzeug/blob/master/src/werkzeug/test.py#L768PEP: https://www.python.org/dev/peps/pep-3333/
The text was updated successfully, but these errors were encountered: