使用ringo webframework测试web应用程序的pytest插件
pytest-ringo的Python项目详细描述
#pytest ringo
使用ringo web框架测试web应用程序的助手fixtures
fixtures
此插件提供以下fixtures:
1。**app**a*testapp*应用程序的*webtest*实例。范围是“模块”。
1。**配置**用于配置路由等的配置对象,作用域为“module”。
1。**apprequest**a*dummyrequest*from*pyramid*用于调用视图。没有作用域。
\helpers
此插件提供以下帮助程序方法。请咨询
来源,了解如何使用这些方法:
**transaction_begin**开始测试用例的新事务
1。**事务回滚**回滚当前运行的事务
\usecases
1。**登录**登录给定用户
**get_data**a helper方法,使用
rest api从应用程序获取数据。
1。**search_data**使用
rest api在
数据库中搜索特定项的助手方法。
1。**get_max_id**使用rest api获取数据库中表的最大id(用于获取最后一个插入项的id)。
invoke
调用py test命令时,需要提供指向.ini文件的url::
使用ringo web框架测试web应用程序的助手fixtures
fixtures
此插件提供以下fixtures:
1。**app**a*testapp*应用程序的*webtest*实例。范围是“模块”。
1。**配置**用于配置路由等的配置对象,作用域为“module”。
1。**apprequest**a*dummyrequest*from*pyramid*用于调用视图。没有作用域。
\helpers
此插件提供以下帮助程序方法。请咨询
来源,了解如何使用这些方法:
**transaction_begin**开始测试用例的新事务
1。**事务回滚**回滚当前运行的事务
\usecases
1。**登录**登录给定用户
**get_data**a helper方法,使用
rest api从应用程序获取数据。
1。**search_data**使用
rest api在
数据库中搜索特定项的助手方法。
1。**get_max_id**使用rest api获取数据库中表的最大id(用于获取最后一个插入项的id)。
invoke
调用py test命令时,需要提供指向.ini文件的url::