Helper fixtures to test web applications using the Ringo web framework
This plugin provides the following fixtures:
- app A TestApp instance from webtest of the application. Scope is "module".
- config The config object used to configure route etc. Scope is "module".
- apprequest A DummyRequest from Pyramid to be used to call views. No scope.
This plugin provides the following helper methods. Please consult the source to see how to use the methods:
- transaction_begin Begin a new transaction for a testcase
- transaction_rollback Rollback the currently running transaction
- login Login a given user
- get_data A helper methods to get data from the application using the REST API.
- search_data A helper methods to search for a specific item in the database using the using the REST API.
- get_max_id Get the max id of a table in the database (usefull to get the id of the last insererted item) using the REST API.
You need to provide the URL to the .ini file when invoking the pytest command::
py-test --app-config="path/to/config.ini"