From 9c4f746d8f215e74576ccf43d8b4adb2c59e925f Mon Sep 17 00:00:00 2001 From: Calen Pennington Date: Thu, 3 Sep 2020 15:57:20 -0400 Subject: [PATCH] Get rid of unused NoOpMigrationModules --- cms/envs/test.py | 1 - common/djangoapps/util/db.py | 13 ------------- lms/envs/test.py | 1 - 3 files changed, 15 deletions(-) diff --git a/cms/envs/test.py b/cms/envs/test.py index 28acea10ae..b07ac309ed 100644 --- a/cms/envs/test.py +++ b/cms/envs/test.py @@ -21,7 +21,6 @@ from django.utils.translation import ugettext_lazy from path import Path as path from openedx.core.lib.derived import derive_settings -from util.db import NoOpMigrationModules from xmodule.modulestore.modulestore_settings import update_module_store_settings diff --git a/common/djangoapps/util/db.py b/common/djangoapps/util/db.py index 3a1320db0d..f6be5c9227 100644 --- a/common/djangoapps/util/db.py +++ b/common/djangoapps/util/db.py @@ -151,16 +151,3 @@ def generate_int_id(minimum=0, maximum=MYSQL_MAX_INT, used_ids=None): cid = random.randint(minimum, maximum) return cid - - -class NoOpMigrationModules(object): - """ - Return invalid migrations modules for apps. Used for disabling migrations during tests. - See https://groups.google.com/d/msg/django-developers/PWPj3etj3-U/kCl6pMsQYYoJ. - """ - - def __contains__(self, item): - return True - - def __getitem__(self, item): - return None diff --git a/lms/envs/test.py b/lms/envs/test.py index ca267fd4e3..bbf6946593 100644 --- a/lms/envs/test.py +++ b/lms/envs/test.py @@ -34,7 +34,6 @@ from xmodule.modulestore.modulestore_settings import update_module_store_setting from .common import * -from util.db import NoOpMigrationModules # pylint: disable=wrong-import-order from util.testing import patch_sessions, patch_testcase # pylint: disable=wrong-import-order # This patch disables the commit_on_success decorator during tests