From b461ce0c27672df717e04899446351f2be987802 Mon Sep 17 00:00:00 2001 From: Nimisha Asthagiri Date: Thu, 26 Oct 2017 18:54:50 -0400 Subject: [PATCH] Rename test files and class name --- .../commands/tests/{tools.py => send_email_base.py} | 4 ++-- .../tests/{test_base.py => test_send_email_base_command.py} | 0 .../management/commands/tests/test_send_recurring_nudge.py | 4 ++-- .../management/commands/tests/test_send_upgrade_reminder.py | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) rename openedx/core/djangoapps/schedules/management/commands/tests/{tools.py => send_email_base.py} (99%) rename openedx/core/djangoapps/schedules/management/commands/tests/{test_base.py => test_send_email_base_command.py} (100%) diff --git a/openedx/core/djangoapps/schedules/management/commands/tests/tools.py b/openedx/core/djangoapps/schedules/management/commands/tests/send_email_base.py similarity index 99% rename from openedx/core/djangoapps/schedules/management/commands/tests/tools.py rename to openedx/core/djangoapps/schedules/management/commands/tests/send_email_base.py index 81c8499a14..718a80b8e3 100644 --- a/openedx/core/djangoapps/schedules/management/commands/tests/tools.py +++ b/openedx/core/djangoapps/schedules/management/commands/tests/send_email_base.py @@ -50,7 +50,7 @@ LOG = logging.getLogger(__name__) @ddt.ddt @freeze_time('2017-08-01 00:00:00', tz_offset=0, tick=True) -class ScheduleBaseEmailTestBase(SharedModuleStoreTestCase): +class ScheduleSendEmailTestBase(SharedModuleStoreTestCase): __test__ = False @@ -59,7 +59,7 @@ class ScheduleBaseEmailTestBase(SharedModuleStoreTestCase): has_course_queries = False def setUp(self): - super(ScheduleBaseEmailTestBase, self).setUp() + super(ScheduleSendEmailTestBase, self).setUp() site = SiteFactory.create() self.site_config = SiteConfigurationFactory.create(site=site) diff --git a/openedx/core/djangoapps/schedules/management/commands/tests/test_base.py b/openedx/core/djangoapps/schedules/management/commands/tests/test_send_email_base_command.py similarity index 100% rename from openedx/core/djangoapps/schedules/management/commands/tests/test_base.py rename to openedx/core/djangoapps/schedules/management/commands/tests/test_send_email_base_command.py diff --git a/openedx/core/djangoapps/schedules/management/commands/tests/test_send_recurring_nudge.py b/openedx/core/djangoapps/schedules/management/commands/tests/test_send_recurring_nudge.py index f99bc47c0c..b3bfa73175 100644 --- a/openedx/core/djangoapps/schedules/management/commands/tests/test_send_recurring_nudge.py +++ b/openedx/core/djangoapps/schedules/management/commands/tests/test_send_recurring_nudge.py @@ -14,7 +14,7 @@ from course_modes.tests.factories import CourseModeFactory from courseware.models import DynamicUpgradeDeadlineConfiguration from openedx.core.djangoapps.schedules import tasks from openedx.core.djangoapps.schedules.management.commands import send_recurring_nudge as nudge -from openedx.core.djangoapps.schedules.management.commands.tests.tools import ScheduleBaseEmailTestBase +from openedx.core.djangoapps.schedules.management.commands.tests.send_email_base import ScheduleSendEmailTestBase from openedx.core.djangoapps.schedules.tests.factories import ScheduleFactory from openedx.core.djangolib.testing.utils import skip_unless_lms from student.tests.factories import UserFactory @@ -24,7 +24,7 @@ from student.tests.factories import UserFactory @skip_unless_lms @skipUnless('openedx.core.djangoapps.schedules.apps.SchedulesConfig' in settings.INSTALLED_APPS, "Can't test schedules if the app isn't installed") -class TestSendRecurringNudge(ScheduleBaseEmailTestBase): +class TestSendRecurringNudge(ScheduleSendEmailTestBase): __test__ = True # pylint: disable=protected-access diff --git a/openedx/core/djangoapps/schedules/management/commands/tests/test_send_upgrade_reminder.py b/openedx/core/djangoapps/schedules/management/commands/tests/test_send_upgrade_reminder.py index 1a01c2748c..4993dbe18c 100644 --- a/openedx/core/djangoapps/schedules/management/commands/tests/test_send_upgrade_reminder.py +++ b/openedx/core/djangoapps/schedules/management/commands/tests/test_send_upgrade_reminder.py @@ -11,7 +11,7 @@ from opaque_keys.edx.locator import CourseLocator from course_modes.models import CourseMode from openedx.core.djangoapps.schedules import tasks from openedx.core.djangoapps.schedules.management.commands import send_upgrade_reminder as reminder -from openedx.core.djangoapps.schedules.management.commands.tests.tools import ScheduleBaseEmailTestBase +from openedx.core.djangoapps.schedules.management.commands.tests.send_email_base import ScheduleSendEmailTestBase from openedx.core.djangoapps.schedules.tests.factories import ScheduleFactory from openedx.core.djangolib.testing.utils import skip_unless_lms from student.tests.factories import UserFactory @@ -24,7 +24,7 @@ LOG = logging.getLogger(__name__) @skip_unless_lms @skipUnless('openedx.core.djangoapps.schedules.apps.SchedulesConfig' in settings.INSTALLED_APPS, "Can't test schedules if the app isn't installed") -class TestUpgradeReminder(ScheduleBaseEmailTestBase): +class TestUpgradeReminder(ScheduleSendEmailTestBase): __test__ = True tested_task = tasks.ScheduleUpgradeReminder