diff --git a/django/test/runner.py b/django/test/runner.py
index 709b685..a2fbafb 100644
a
|
b
|
def setup_databases(verbosity, interactive, **kwargs):
|
238 | 238 | mirrored_aliases = {} |
239 | 239 | test_databases = {} |
240 | 240 | dependencies = {} |
| 241 | default_sig = connections[DEFAULT_DB_ALIAS].creation.test_db_signature() |
241 | 242 | for alias in connections: |
242 | 243 | connection = connections[alias] |
243 | 244 | if connection.settings_dict['TEST_MIRROR']: |
… |
… |
def setup_databases(verbosity, interactive, **kwargs):
|
259 | 260 | dependencies[alias] = ( |
260 | 261 | connection.settings_dict['TEST_DEPENDENCIES']) |
261 | 262 | else: |
262 | | if alias != DEFAULT_DB_ALIAS: |
| 263 | if alias != DEFAULT_DB_ALIAS and not connection.creation.test_db_signature() == default_sig: |
263 | 264 | dependencies[alias] = connection.settings_dict.get( |
264 | 265 | 'TEST_DEPENDENCIES', [DEFAULT_DB_ALIAS]) |
265 | 266 | |
diff --git a/tests/test_runner/tests.py b/tests/test_runner/tests.py
index 4e9e44b..0c7c966 100644
a
|
b
|
class DummyBackendTest(unittest.TestCase):
|
291 | 291 | db.connections = old_db_connections |
292 | 292 | |
293 | 293 | |
| 294 | class AliasedDefaultTestSetupTest(unittest.TestCase): |
| 295 | def test_setup_aliased_default_database(self): |
| 296 | """ |
| 297 | Test that setup_datebases() doesn't fail when 'default' is aliased |
| 298 | """ |
| 299 | runner_instance = runner.DiscoverRunner(verbosity=0) |
| 300 | old_db_connections = db.connections |
| 301 | try: |
| 302 | db.connections = db.ConnectionHandler({ |
| 303 | 'default': { |
| 304 | 'NAME': 'dummy' |
| 305 | }, |
| 306 | 'aliased': { |
| 307 | 'NAME': 'dummy' |
| 308 | } |
| 309 | }) |
| 310 | old_config = runner_instance.setup_databases() |
| 311 | runner_instance.teardown_databases(old_config) |
| 312 | except Exception as e: |
| 313 | self.fail("setup_databases/teardown_databases unexpectedly raised " |
| 314 | "an error: %s" % e) |
| 315 | finally: |
| 316 | db.connections = old_db_connections |
| 317 | |
| 318 | |
294 | 319 | class DeprecationDisplayTest(AdminScriptTestCase): |
295 | 320 | # tests for 19546 |
296 | 321 | def setUp(self): |