Perhaps your DATABASE_USER does not have permission to create a new database / schema.
Edit
If you read the source for the Django test command, you will see that it always creates a test database. In addition, it changes your settings to link to this test database.
See this: http://docs.djangoproject.com/en/dev/topics/testing/#id1
What you need to do is use lights . This is how we do it.
From the template database, create a "binding". Use the manage.py dumpdata to create a JSON file with all of your template data. [Hint, option --indent=2 provides readable JSON that you can edit and modify.]
Put this in the fixtures directory in your application.
A reference to the instrument file in the definition of the TestCase class. This will load the instrument before starting the test.
class AnimalTestCase(TestCase): fixtures = ['mammals.json', 'birds'] def testFluffyAnimals(self): etc.
Lights replace your template database. You no longer need a template if you have lights.
source share