0

我有一个项目结构

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

我在这里没有做什么?

4

1 回答 1

1

好吧,您的应用程序称为测试,复数..无论如何,出于明显的原因,您可能希望避免使用该名称

于 2012-07-16T14:08:08.777 回答