If I read django.test.simple.DjangoTestSuiteRunner.setup_databases , you can avoid creating a test database by specifying the 'TEST_MIRROR' parameter for your database.
This parameter is intended for checking the configuration of the master / slave , but you can achieve the expected effect if you install the mirror in the same database as the one you are setting the parameter on:
DATABASES = { 'A': { 'ENGINE': ..., # standard configuration goes here 'TEST_MIRROR': 'A', }, 'B': { 'ENGINE': ..., # no TEST_MIRROR, a test database will be created for B } }
No test database will be created for " A ", instead it will be replaced with its TEST_MIRROR , which is also " A ", so the tests will run " A " and " test_B " as intended.
source share