[Answered ]-How to define Django settings without default DB settings?

2👍

Your default database is not empty:

'default': {  # Leave this blank, we do not want a 'default' database defined.
    'ENGINE': '', 
    'NAME': '',
    'USER': '',
    'PASSWORD': '',
    'HOST': '',
    'PORT': '',
},

Change it to

'default': {},

Additionally, you are missing routing for auth. Change one of your routers to accept also auth or add a third router for it.

👤skoll

0👍

To surpass the internal checking mechanism :

# We wont use Django databases
DATABASES = {
    'default': {
        'ENGINE': '',
    }
}

# Override TestRunner methods
TEST_RUNNER = 'tests.NoSQLTestRunner'

You will make another tests.py file and save the things below

from django.test.simple import DjangoTestSuiteRunner
from django.test import TestCase

class NoSQLTestRunner(DjangoTestSuiteRunner):
    def setup_databases(self):
        pass
    def teardown_databases(self, *args):
        pass

class NoSQLTestCase(TestCase):
    def _fixture_setup(self):
        pass
    def _fixture_teardown(self):
        pass

Leave a comment