Skip to content

Commit f4941fb

Browse files
committed
Force the tests to always find the toolbar's migrations.
1 parent 91af4eb commit f4941fb

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

tests/settings.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,10 @@
128128

129129
DEFAULT_AUTO_FIELD = "django.db.models.AutoField"
130130

131+
# Force the MIGRATION_MODULES to always find our migrations.
132+
# See debug_toolbar/apps.py::_manage_migrations_visibility
133+
MIGRATION_MODULES = {"debug_toolbar": "debug_toolbar.migrations"}
134+
131135
# Debug Toolbar configuration
132136

133137
DEBUG_TOOLBAR_CONFIG = {

tests/test_store.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,9 @@ def test_get_store_with_setting(self):
132132
self.assertIs(store.get_store(), StubStore)
133133

134134

135+
@override_settings(
136+
DEBUG_TOOLBAR_CONFIG={"TOOLBAR_STORE_CLASS": "debug_toolbar.store.DatabaseStore"}
137+
)
135138
class DatabaseStoreTestCase(TestCase):
136139
@classmethod
137140
def setUpTestData(cls) -> None:

0 commit comments

Comments
 (0)