Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
A small testing framework for WSGI applications based around WebOb.
Source: https://github.com/Pylons/webtest/blob/3.0.6/webtest/__init__.py
Docs: https://docs.pylonsproject.org/projects/webtest/en/latest/
webtest.forms.Form
turned out a little more lax than I would've liked. But making it more strict would've probably caused quite a bit of churn in test code, like not being able to useCheckbox.checked
without first doing anisinstance
check, or either having to do the same forSelect.select
/MultipleSelect.select_multiple
or having to switch toForm.select
/Form.select_multiple
.I also debated for a while on whether or not to make
TestApp
generic, but ultimately it seemed worth it, since if you have a test fixture that returns aTestApp
, you don't necessarily want to have to specify another fixture in order to get at theWSGIApplication
that's being tested with the correct type information. Giving theTypeVar
a default ofWSGIApplication
should end up making it behave more or less the same as the non-generic version, if you don't care about being able to access the application throughTestApp.app
.