Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(testing): Add TestClient class and a pytest example
Add a contextual wrapper for the simulate_* methods and a pytest example demonstrating its use. Also deprecate "api" in favor of "app" in TestCase, since these utils can work with any WSGI app (not just those that express HTTP APIs). This terminology makes TestCase more consistent with the new simulate_* functions and with TestClient. Finally, deprecate "api_class" in TestCase and update the docstring for the testing module to demonstrate a less hacky alternative for controlling the api instance type. As a bonus, this avoids having to try and alias api_class (a class variable). Partially implements #16
- Loading branch information
Kurt Griffiths
committed
Aug 12, 2016
1 parent
498b4b6
commit 66a6898
Showing
4 changed files
with
189 additions
and
168 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.