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
2adbac03
Commit
2adbac03
authored
Oct 26, 2017
by
Nimisha Asthagiri
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixup! Move test_resolver_send into the schedule management command base class
parent
eac5f21c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
13 deletions
+10
-13
openedx/core/djangoapps/schedules/management/commands/tests/tools.py
+10
-13
No files found.
openedx/core/djangoapps/schedules/management/commands/tests/tools.py
View file @
2adbac03
...
...
@@ -92,21 +92,18 @@ class ScheduleBaseEmailTestBase(SharedModuleStoreTestCase):
@patch.object
(
tasks
,
'ace'
)
def
test_resolver_send
(
self
,
mock_ace
):
current_day
=
datetime
.
datetime
(
2017
,
8
,
1
,
tzinfo
=
pytz
.
UTC
)
offset
=
self
.
expected_offsets
[
0
]
target_day
=
current_day
+
datetime
.
timedelta
(
days
=
offset
)
current_day
,
offset
,
target_day
=
self
.
_get_dates
()
with
patch
.
object
(
self
.
tested_task
,
'apply_async'
)
as
mock_apply_async
:
self
.
tested_task
.
enqueue
(
self
.
site_config
.
site
,
current_day
,
offset
)
mock_apply_async
.
assert_any_call
(
(
self
.
site_config
.
site
.
id
,
serialize
(
target_day
),
offset
,
0
,
None
),
retry
=
False
,
)
mock_apply_async
.
assert_any_call
(
(
self
.
site_config
.
site
.
id
,
serialize
(
target_day
),
offset
,
self
.
tested_task
.
num_bins
-
1
,
None
),
retry
=
False
,
)
self
.
assertFalse
(
mock_ace
.
send
.
called
)
mock_apply_async
.
assert_any_call
(
(
self
.
site_config
.
site
.
id
,
serialize
(
target_day
),
offset
,
0
,
None
),
retry
=
False
,
)
mock_apply_async
.
assert_any_call
(
(
self
.
site_config
.
site
.
id
,
serialize
(
target_day
),
offset
,
self
.
tested_task
.
num_bins
-
1
,
None
),
retry
=
False
,
)
self
.
assertFalse
(
mock_ace
.
send
.
called
)
@ddt.data
(
1
,
10
,
100
)
@patch.object
(
tasks
,
'ace'
)
...
...
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