Django 1.4 says: "There are no database specifications. Indicate the path to at least one instrument on the command line."

while all tests complete without errors, and the instruments actually boot. Is this a Django 1.4 issue?

Please note that only some of the applications cause this error message (there is no fundamental difference between unit tests of applications and their corresponding devices).

Update 1: contents of fasttest.py:

DATABASES = {'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': ':memory:', } } ~/django_project$ ./manage.py test appname --traceback --settings=fasttest Creating test database for alias 'default'... .....................No database fixture specified. Please provide the path of at least one fixture in the command line. . ---------------------------------------------------------------------- Ran 22 tests in 8.426s OK Destroying test database for alias 'default'... 

Update 2: obviously comments, although I am grateful for the attempts, these are only shots in the dark. The database does not matter, neither SQLite3 nor Postgres test databases solve the problem.

+6
source share
1 answer

I had the same problem with test devices that worked perfectly under 1.4.

For me, I had one test scenario in which I did not use the device, and therefore I installed the devices in an empty kit as follows:

 class MyTestCase(TestCase): fixtures = [] 

When I commented on this line, the error disappeared:

 class MyTestCase(TestCase): # fixtures = [] 
+7
source

Source: https://habr.com/ru/post/915567/


All Articles