我正在尝试使用 django-test-utils 在测试运行后保留我的数据库。
但是当我执行快速测试命令时:
python manage.py quicktest
我收到此错误:
re/management/__init__.py", line 382, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/apps/desarrollo/workspace/3sure-server/venv/local/lib/python2.7/site-packages/django/core/management/base.py", line 196, in run_from_argv
self.execute(*args, **options.__dict__)
File "/apps/desarrollo/workspace/3sure-server/venv/local/lib/python2.7/site-packages/django/core/management/base.py", line 232, in execute
output = self.handle(*args, **options)
File "/apps/desarrollo/workspace/3sure-server/venv/local/lib/python2.7/site-packages/test_utils/management/commands/quicktest.py", line 30, in handle
failures = test_runner(test_labels, verbosity=verbosity, interactive=interactive)
File "/apps/desarrollo/workspace/3sure-server/venv/local/lib/python2.7/site-packages/test_utils/test_runners/keep_database.py", line 30, in run_tests
setup_test_environment()
NameError: global name 'setup_test_environment' is not defined
我已经使用 pip 安装了 django-test-utils 并在我的 settings.py 中引用了该应用程序。我错过了安装步骤吗?
我正在使用 Django==1.4.3 和 django-test-utils==0.3
谢谢你。