Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
5be19e22
Commit
5be19e22
authored
Oct 25, 2017
by
Calen Pennington
Committed by
Nimisha Asthagiri
Oct 26, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Induce a base class for schedule email management command tests
parent
8435e7b5
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
2 deletions
+8
-2
openedx/core/djangoapps/schedules/management/commands/tests/test_send_recurring_nudge.py
+2
-1
openedx/core/djangoapps/schedules/management/commands/tests/test_send_upgrade_reminder.py
+2
-1
openedx/core/djangoapps/schedules/management/commands/tests/tools.py
+4
-0
No files found.
openedx/core/djangoapps/schedules/management/commands/tests/test_send_recurring_nudge.py
View file @
5be19e22
...
...
@@ -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
,
CacheIsolationTestC
ase
):
class
TestSendRecurringNudge
(
ScheduleBaseEmailTestB
ase
):
# pylint: disable=protected-access
ENABLED_CACHES
=
[
'default'
]
...
...
openedx/core/djangoapps/schedules/management/commands/tests/test_send_upgrade_reminder.py
View file @
5be19e22
...
...
@@ -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
(
S
cheduleBaseEmailTestBase
,
S
haredModuleStoreTestCase
):
ENABLED_CACHES
=
[
'default'
]
...
...
openedx/core/djangoapps/schedules/management/commands/tests/tools.py
0 → 100644
View file @
5be19e22
from
openedx.core.djangolib.testing.utils
import
CacheIsolationTestCase
,
FilteredQueryCountMixin
class
ScheduleBaseEmailTestBase
(
FilteredQueryCountMixin
,
CacheIsolationTestCase
):
pass
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment