Commit 5be19e22 by Calen Pennington Committed by Nimisha Asthagiri

Induce a base class for schedule email management command tests

parent 8435e7b5
......@@ -21,6 +21,7 @@ from courseware.models import DynamicUpgradeDeadlineConfiguration
from openedx.core.djangoapps.content.course_overviews.tests.factories import CourseOverviewFactory
from openedx.core.djangoapps.schedules import resolvers, 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.tests.factories import ScheduleConfigFactory, ScheduleFactory
from openedx.core.djangoapps.site_configuration.tests.factories import SiteConfigurationFactory, SiteFactory
from openedx.core.djangoapps.waffle_utils.testutils import WAFFLE_TABLES
......@@ -45,7 +46,7 @@ NUM_COURSE_MODES_QUERIES = 1
@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(FilteredQueryCountMixin, CacheIsolationTestCase):
class TestSendRecurringNudge(ScheduleBaseEmailTestBase):
# pylint: disable=protected-access
ENABLED_CACHES = ['default']
......
......@@ -22,6 +22,7 @@ from courseware.models import DynamicUpgradeDeadlineConfiguration
from openedx.core.djangoapps.content.course_overviews.models import CourseOverview
from openedx.core.djangoapps.schedules import resolvers, 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.tests.factories import ScheduleConfigFactory, ScheduleFactory
from openedx.core.djangoapps.site_configuration.tests.factories import SiteConfigurationFactory, SiteFactory
from openedx.core.djangoapps.waffle_utils.testutils import WAFFLE_TABLES
......@@ -59,7 +60,7 @@ LOG = logging.getLogger(__name__)
@skipUnless('openedx.core.djangoapps.schedules.apps.SchedulesConfig' in settings.INSTALLED_APPS,
"Can't test schedules if the app isn't installed")
@freeze_time('2017-08-01 00:00:00', tz_offset=0, tick=True)
class TestUpgradeReminder(SharedModuleStoreTestCase):
class TestUpgradeReminder(ScheduleBaseEmailTestBase, SharedModuleStoreTestCase):
ENABLED_CACHES = ['default']
......
from openedx.core.djangolib.testing.utils import CacheIsolationTestCase, FilteredQueryCountMixin
class ScheduleBaseEmailTestBase(FilteredQueryCountMixin, CacheIsolationTestCase):
pass
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment