使用带有pytestdjango的临时PostgreSQL数据库
pytest-django-testing-postgresql的Python项目详细描述
用例
这个pytest插件可用于测试使用 PostgreSQL。它利用testing.postgresql模块来设置 临时PostgreSQL数据库服务器,并为其注入配置 进入Django的环境。拟与 pytest-django。在
要求
testing.postgresql需要可用的postgresql server二进制文件。在
如何使用
要使用,只需在测试环境和laod中安装包 运行pytest时的django testing psotgresql插件(通常为pytest 自动发现它)。在
该插件重新使用pytest-django使用的配置。在
局限性
现在,这个插件只能重新配置默认的数据库。在
- 项目
标签: