From 7d50d2bcb8a3cf3fea727174717ead7e6508e9e2 Mon Sep 17 00:00:00 2001 From: Tim Graham Date: Fri, 27 Jan 2017 20:06:55 -0500 Subject: [PATCH] Refs #27790 -- Reverted "Removed available_apps on TestCase subclasses." This reverts commit 91023d79ec70df9289271e63a67675ee51e7dea8 as it increases memory usage for the test suite. --- tests/multiple_database/tests.py | 6 ++++++ tests/swappable_models/tests.py | 7 +++++++ 2 files changed, 13 insertions(+) diff --git a/tests/multiple_database/tests.py b/tests/multiple_database/tests.py index ec04a37e2f..0cd313d87c 100644 --- a/tests/multiple_database/tests.py +++ b/tests/multiple_database/tests.py @@ -1792,6 +1792,12 @@ class SyncOnlyDefaultDatabaseRouter: class MigrateTestCase(TestCase): + # Limit memory usage when calling 'migrate'. + available_apps = [ + 'multiple_database', + 'django.contrib.auth', + 'django.contrib.contenttypes' + ] multi_db = True def test_migrate_to_other_database(self): diff --git a/tests/swappable_models/tests.py b/tests/swappable_models/tests.py index e9d15db015..bdf681dd87 100644 --- a/tests/swappable_models/tests.py +++ b/tests/swappable_models/tests.py @@ -10,6 +10,13 @@ from .models import Article class SwappableModelTests(TestCase): + # Limit memory usage when calling 'migrate'. + available_apps = [ + 'swappable_models', + 'django.contrib.auth', + 'django.contrib.contenttypes', + ] + @override_settings(TEST_ARTICLE_MODEL='swappable_models.AlternateArticle') def test_generated_data(self): "Permissions and content types are not created for a swapped model"