Commit 2550f123 by arbisoft Committed by Zia Fazal

ECOM-528 removed the commented code in test cases

parent 6b689aae
......@@ -129,53 +129,32 @@ class TestRecentEnrollments(ModuleStoreTestCase):
@ddt.data(
#Register as an honor in any course modes with no payment option
([('audit', 0), ('honor', 0)], 'honor', True),
# ([('professional', 0)], 'honor', True), #This can not be the case as verified courses always has min_price
# ([('verified', 0)], 'honor', True), #This can not be the case as verified courses always has min_price
# ([('professional', 0), ('verified', 0)], 'honor', True), #This can not be the case as verified courses always has min_price
# ([('audit', 0), ('honor', 0), ('professional', 0)], 'honor', True), #This can not be the case as verified courses always has min_price
# ([('audit', 0), ('honor', 0), ('verified', 0)], 'honor', True), #This can not be the case as verified courses always has min_price
# ([('audit', 0), ('honor', 0), ('verified', 0), ('professional', 0)], 'honor', True), #This can not be the case as verified courses always has min_price
([('audit', 0)], 'honor', True),
([('honor', 0)], 'honor', True),
([], 'honor', True),
#Register as an honor in any course modes which has payment option
([('audit', 0), ('honor', 10)], 'honor', False),
([('audit', 10), ('honor', 0)], 'honor', False),
([('professional', 20)], 'honor', True),
([('verified', 20)], 'honor', True),
([('professional', 20), ('verified', 20)], 'honor', True),
([('audit', 0), ('honor', 5), ('professional', 20)], 'honor', True),
([('audit', 0), ('honor', 10), ('verified', 20)], 'honor', True),
([('audit', 0), ('honor', 10), ('verified', 20), ('professional', 20)], 'honor', True),
([('audit', 10), ('honor', 0), ('verified', 20), ('professional', 20)], 'honor', True),
([('audit', 10)], 'honor', False),
([('honor', 10)], 'honor', False),
([], 'honor', True),
#Register as an audit in any course modes with no payment option
([('audit', 0), ('honor', 0)], 'audit', True),
# ([('professional', 0)], 'audit', True), #This can not be the case as verified courses always has min_price
# ([('verified', 0)], 'audit', True), #This can not be the case as verified courses always has min_price
# ([('professional', 0), ('verified', 0)], 'audit', True), #This can not be the case as verified courses always has min_price
# ([('audit', 0), ('honor', 0), ('professional', 0)], 'audit', True), #This can not be the case as verified courses always has min_price
# ([('audit', 0), ('honor', 0), ('verified', 0)], 'audit', True), #This can not be the case as verified courses always has min_price
# ([('audit', 0), ('honor', 0), ('verified', 0), ('professional', 0)], 'audit', True), #This can not be the case as verified courses always has min_price
([('audit', 0)], 'audit', True),
([('honor', 0)], 'audit', True),
([], 'audit', True),
#Register as an audit in any course modes which has payment option
([('audit', 0), ('honor', 10)], 'audit', False),
# ([('professional', 20)], 'audit', True), #This can not be the case as verified courses always has min_price
# ([('verified', 20)], 'audit', True), #This can not be the case as verified courses always has min_price
# ([('professional', 20), ('verified', 20)], 'audit', True), #This can not be the case as verified courses always has min_price
# ([('audit', 0), ('honor', 5), ('professional', 20)], 'audit', True), #This can not be the case as verified courses always has min_price
# ([('audit', 0), ('honor', 10), ('verified', 20)], 'audit', True), #This can not be the case as verified courses always has min_price
# ([('audit', 0), ('honor', 10), ('verified', 20), ('professional', 20)], 'audit', True), #This can not be the case as verified courses always has min_price
([('audit', 10), ('honor', 0)], 'audit', False),
([('audit', 10)], 'audit', False),
([('honor', 10)], 'audit', False),
([], 'audit', True),
#Register as a verified in any course modes which has payment option
([('audit', 0), ('honor', 10)], 'verified', False),
([('professional', 20)], 'verified', False),
......@@ -186,8 +165,6 @@ class TestRecentEnrollments(ModuleStoreTestCase):
([('audit', 0), ('honor', 10), ('verified', 20), ('professional', 20)], 'verified', False),
([('audit', 10)], 'verified', False),
([('honor', 10)], 'verified', False),
# ([], 'audit', True),
)
@ddt.unpack
def test_donate_button(self, course_modes, enrollment_mode, show_donate):
......
......@@ -754,6 +754,7 @@ def _allow_donation(course_modes, course_id, enrollment):
Args:
course_modes (dict): Mapping of course ID's to course mode dictionaries.
course_id (str): The unique identifier for the course.
enrollment(CourseEnrollment): The enrollment object in which the user is enrolled
Returns:
True if the course is allowing donations.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment