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
346a2bcf
Commit
346a2bcf
authored
Oct 26, 2017
by
Nimisha Asthagiri
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move _calculate_bin_for_user into the schedules management command base test class
parent
82978e51
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
6 deletions
+3
-6
openedx/core/djangoapps/schedules/management/commands/tests/test_send_recurring_nudge.py
+0
-3
openedx/core/djangoapps/schedules/management/commands/tests/test_send_upgrade_reminder.py
+0
-3
openedx/core/djangoapps/schedules/management/commands/tests/tools.py
+3
-0
No files found.
openedx/core/djangoapps/schedules/management/commands/tests/test_send_recurring_nudge.py
View file @
346a2bcf
...
...
@@ -178,9 +178,6 @@ class TestSendRecurringNudge(ScheduleBaseEmailTestBase):
return
sent_messages
def
_calculate_bin_for_user
(
self
,
user
):
return
user
.
id
%
resolvers
.
RECURRING_NUDGE_NUM_BINS
def
_contains_upsell_attribute
(
self
,
msg_attr
):
msg
=
Message
.
from_string
(
msg_attr
)
tmp
=
msg
.
context
[
"show_upsell"
]
...
...
openedx/core/djangoapps/schedules/management/commands/tests/test_send_upgrade_reminder.py
View file @
346a2bcf
...
...
@@ -71,9 +71,6 @@ class TestUpgradeReminder(ScheduleBaseEmailTestBase):
expiration_datetime
=
datetime
.
datetime
.
now
(
pytz
.
UTC
)
+
datetime
.
timedelta
(
days
=
30
),
)
def
_calculate_bin_for_user
(
self
,
user
):
return
user
.
id
%
resolvers
.
UPGRADE_REMINDER_NUM_BINS
@patch.object
(
tasks
,
'_upgrade_reminder_schedule_send'
)
def
test_dont_send_to_verified_learner
(
self
,
mock_schedule_send
):
upgrade_deadline
=
datetime
.
datetime
.
now
(
pytz
.
UTC
)
+
datetime
.
timedelta
(
days
=
2
)
...
...
openedx/core/djangoapps/schedules/management/commands/tests/tools.py
View file @
346a2bcf
...
...
@@ -80,6 +80,9 @@ class ScheduleBaseEmailTestBase(SharedModuleStoreTestCase):
DynamicUpgradeDeadlineConfiguration
.
objects
.
create
(
enabled
=
True
)
def
_calculate_bin_for_user
(
self
,
user
):
return
user
.
id
%
self
.
tested_task
.
num_bins
def
_get_template_overrides
(
self
):
templates_override
=
deepcopy
(
settings
.
TEMPLATES
)
templates_override
[
0
][
'OPTIONS'
][
'string_if_invalid'
]
=
"TEMPLATE WARNING - MISSING VARIABLE [
%
s]"
...
...
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