django.core.exceptions.ImproperlyConfigured:无法找到带标签测试的应用程序?

时间:2012-07-16 14:02:47

标签: python django

我有一个项目结构

myApp/
     apps/
         tests/
              __init__.py
              tests.py  

tests.py如下所示

from django.test import TestCase

class VideoTest(TestCase):
    def test_video_insert(self):
        self.assertTrue(true)

当我尝试从命令行测试时,我做

dirBeforeMyApp$python manage.py test test.VideoTest --settings=myApp.settings.dev 

我看到以下错误

  File "/Users/user/code/p/virtualenv/myApp/lib/python2.7/site-packages/django/db/models/loading.py", line 152, in get_app
    raise ImproperlyConfigured("App with label %s could not be found" % app_label)
django.core.exceptions.ImproperlyConfigured: App with label test could not be found

我在这里做的不是什么?

1 个答案:

答案 0 :(得分:1)

你的应用程序被称为测试,复数..无论如何,您可能希望避免使用该名称