Merge pull request #25646 from open-craft/0x29a/squash_tests_warnings

Replace 'multi_db = True' with 'databases = {alias for alias in connections}'
This commit is contained in:
Feanil Patel
2020-11-20 09:53:24 -05:00
committed by GitHub
7 changed files with 20 additions and 13 deletions

View File

@@ -12,6 +12,7 @@ from enum import Enum
from django.conf import settings
from django.contrib.auth.models import AnonymousUser, User
from django.db import connections
from django.test import TestCase
from django.test.utils import override_settings
from mock import patch
@@ -397,7 +398,7 @@ class SharedModuleStoreTestCase(
for Django ORM models that will get cleaned up properly.
"""
# Tell Django to clean out all databases, not just default
multi_db = True
databases = {alias for alias in connections}
@classmethod
@contextmanager
@@ -486,7 +487,7 @@ class ModuleStoreTestCase(
CREATE_USER = True
# Tell Django to clean out all databases, not just default
multi_db = True
databases = {alias for alias in connections}
@classmethod
def setUpClass(cls):