Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
course-discovery
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
course-discovery
Commits
dd6cd90f
Commit
dd6cd90f
authored
Feb 14, 2017
by
tasawernawaz
Committed by
Tasawer Nawaz
Feb 14, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix course min and max effort ECOM-7219
parent
32678504
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
1 deletions
+22
-1
course_discovery/apps/publisher/tests/test_views.py
+21
-0
course_discovery/templates/publisher/add_update_course_form.html
+1
-1
No files found.
course_discovery/apps/publisher/tests/test_views.py
View file @
dd6cd90f
...
...
@@ -2215,6 +2215,27 @@ class CourseRunEditViewTests(TestCase):
'EdX has updated a Studio instance for '
)
def
test_effort_on_edit_page
(
self
):
"""
Verify that users can update course min_effort and max_effort from edit page.
"""
self
.
updated_dict
[
'min_effort'
]
=
2
self
.
updated_dict
[
'max_effort'
]
=
5
response
=
self
.
client
.
post
(
self
.
edit_page_url
,
self
.
updated_dict
)
self
.
assertRedirects
(
response
,
expected_url
=
reverse
(
'publisher:publisher_course_run_detail'
,
kwargs
=
{
'pk'
:
self
.
new_course_run
.
id
}),
status_code
=
302
,
target_status_code
=
200
)
self
.
new_course_run
=
CourseRun
.
objects
.
get
(
id
=
self
.
new_course_run
.
id
)
self
.
assertEqual
(
self
.
new_course_run
.
min_effort
,
self
.
updated_dict
[
'min_effort'
])
self
.
assertEqual
(
self
.
new_course_run
.
max_effort
,
self
.
updated_dict
[
'max_effort'
])
def
assert_email_sent
(
self
,
object_path
,
subject
,
expected_body
):
"""
DRY method to assert sent email data.
...
...
course_discovery/templates/publisher/add_update_course_form.html
View file @
dd6cd90f
...
...
@@ -449,7 +449,7 @@
</div>
<div
class=
"col col-6"
>
<label
class=
"field-label "
>
{% trans "Max Effort" %}
</label>
{{ run_form.m
in
_effort }}
{{ run_form.m
ax
_effort }}
</div>
</div>
</div>
...
...
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