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
2c062ca0
Commit
2c062ca0
authored
Oct 26, 2014
by
Will Daly
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a test for donations with a white-label course mode
parent
ff4a1755
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
0 deletions
+14
-0
common/djangoapps/student/tests/test_recent_enrollments.py
+14
-0
No files found.
common/djangoapps/student/tests/test_recent_enrollments.py
View file @
2c062ca0
...
...
@@ -154,3 +154,17 @@ class TestRecentEnrollments(ModuleStoreTestCase):
self
.
assertContains
(
response
,
"donate-container"
)
else
:
self
.
assertNotContains
(
response
,
"donate-container"
)
def
test_donate_button_honor_with_price
(
self
):
# Enable the enrollment success message and donations
self
.
_configure_message_timeout
(
10000
)
DonationConfiguration
(
enabled
=
True
)
.
save
()
# Create a white-label course mode
# (honor mode with a price set)
CourseModeFactory
(
mode_slug
=
"honor"
,
course_id
=
self
.
course
.
id
,
min_price
=
100
)
# Check that the donate button is NOT displayed
self
.
client
.
login
(
username
=
self
.
student
.
username
,
password
=
self
.
PASSWORD
)
response
=
self
.
client
.
get
(
reverse
(
"dashboard"
))
self
.
assertNotContains
(
response
,
"donate-container"
)
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