使用 django 1.6,我有一个带有 tests.py 文件的 django 应用程序
app
- tests.py
在这个文件中我测试了一些管理功能
from management.commands.getevents import some_function
当我尝试将 tests.py 更改为包含不同测试文件的测试目录时
app
- tests
-- __init__.py
-- test_models.py
-- test_views.py
-- test_managements.py
我尝试运行测试
python manage.py test
得到这个错误
ImportError: Failed to import test module: events.tests.test_managements
...
ImportError: No module named management.commands...
使用测试文件的目录,为什么 django 看不到管理模块?