标签:pytest-django
-
从sqlite迁移到Postgres(django)时如何更新单元测试 - python
我有一个带有许多视图/模型的较大的Django项目。我最近将我的项目从sqlite3迁移到本地的postgres,并计划进一步扩展(将postgres放在单独的机器上,等等)。 从sqlite迁移到postgres时,我遵循了these instructions,它似乎运行得很好。 (即,我正在运行的应用看上去与数据库为sqlite时相同) 我的问题是这样的 […]
-
尝试运行pytest-django时出现“应用尚未加载” - python
以Django tutorial中的(部分)民意测验应用程序为例,我试图让pytest-django运行。 使用命令django-admin startproject mysite2,我创建了一个具有以下结构的项目目录: . ├── db.sqlite3 ├── manage.py ├── mysite2 │ ├── __init__.py │ ├─ […]
-
使用Django测试工作获取live_server装置 - python
我想一起使用pytest,pytest-django和pytest-selenium来测试我的Django应用程序功能。如果我使用python manage.py runserver手动启动服务器,然后手动输入URL,则可以正常工作。 来自live_server的pytest-django固定装置应该在我可以使用的后台启动服务器进程,但是它不起作用。我没有通 […]