diff --git a/django/db/backends/creation.py b/django/db/backends/creation.py
index f03df5d..47ab578 100644
a
|
b
|
import sys
|
2 | 2 | import time |
3 | 3 | |
4 | 4 | from django.conf import settings |
| 5 | from django.db import connections |
5 | 6 | |
6 | 7 | # The prefix to put on the default database name when creating |
7 | 8 | # the test database. |
… |
… |
class BaseDatabaseCreation(object):
|
231 | 232 | # Confirm the feature set of the test database |
232 | 233 | self.connection.features.confirm() |
233 | 234 | |
| 235 | # Also confirm the features for all mirrors of the test database. |
| 236 | for conn in connections.all(): |
| 237 | mirror = connections.databases[conn.alias].get('TEST_MIRROR') |
| 238 | if mirror and mirror == self.connection.alias: |
| 239 | conn.features.confirm() |
| 240 | |
234 | 241 | # Report syncdb messages at one level lower than that requested. |
235 | 242 | # This ensures we don't get flooded with messages during testing |
236 | 243 | # (unless you really ask to be flooded) |
diff --git a/tests/modeltests/transactions/tests.py b/tests/modeltests/transactions/tests.py
index ed416e2..d358ade 100644
a
|
b
|
class TransactionTests(TransactionTestCase):
|
160 | 160 | using_manually_managed_mistake |
161 | 161 | ) |
162 | 162 | |
| 163 | def test_mirror_features(self): |
| 164 | from django.conf import settings |
| 165 | from django.db import connections |
| 166 | from django.db.backends.creation import BaseDatabaseCreation |
| 167 | |
| 168 | settings.DATABASES['other']['TEST_MIRROR'] = 'default' |
| 169 | |
| 170 | class DummyDatabaseCreation(BaseDatabaseCreation): |
| 171 | def _create_test_db(self, *args, **kwargs): |
| 172 | pass |
| 173 | |
| 174 | creator = DummyDatabaseCreation(connections['default']) |
| 175 | creator.create_test_db() |
| 176 | |
| 177 | self.assertTrue(connections['default'].features.supports_transactions) |
| 178 | self.assertTrue(connections['other'].features.supports_transactions) |
| 179 | |
| 180 | del settings.DATABASES['other']['TEST_MIRROR'] |
163 | 181 | |
164 | 182 | class TransactionRollbackTests(TransactionTestCase): |
165 | 183 | def execute_bad_sql(self): |