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
895f4a36
Commit
895f4a36
authored
Oct 08, 2015
by
openedx-newbie
Committed by
Xavier Antoviaque
Oct 08, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix enrollment terminology in about page tests
parent
f69a9288
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
11 deletions
+11
-11
lms/djangoapps/courseware/tests/test_about.py
+9
-9
lms/djangoapps/courseware/tests/test_microsites.py
+2
-2
No files found.
lms/djangoapps/courseware/tests/test_about.py
View file @
895f4a36
...
...
@@ -96,7 +96,7 @@ class AboutTestCase(LoginEnrollmentTestCase, ModuleStoreTestCase, EventTrackingT
url
=
reverse
(
'about_course'
,
args
=
[
self
.
course
.
id
.
to_deprecated_string
()])
resp
=
self
.
client
.
get
(
url
)
self
.
assertEqual
(
resp
.
status_code
,
200
)
self
.
assertIn
(
"You are
registered for
this course"
,
resp
.
content
)
self
.
assertIn
(
"You are
enrolled in
this course"
,
resp
.
content
)
self
.
assertIn
(
"View Courseware"
,
resp
.
content
)
@override_settings
(
COURSE_ABOUT_VISIBILITY_PERMISSION
=
"see_about_page"
)
...
...
@@ -244,7 +244,7 @@ class AboutWithCappedEnrollmentsTestCase(LoginEnrollmentTestCase, ModuleStoreTes
self
.
enroll
(
self
.
course
,
verify
=
True
)
# create a new account since the first account is already
registered for
the course
# create a new account since the first account is already
enrolled in
the course
self
.
email
=
'foo_second@test.com'
self
.
password
=
'bar'
self
.
username
=
'test_second'
...
...
@@ -307,7 +307,7 @@ class AboutWithInvitationOnly(ModuleStoreTestCase):
url
=
reverse
(
'about_course'
,
args
=
[
self
.
course
.
id
.
to_deprecated_string
()])
resp
=
self
.
client
.
get
(
url
)
self
.
assertEqual
(
resp
.
status_code
,
200
)
self
.
assertIn
(
u"
Register for
{}"
.
format
(
self
.
course
.
id
.
course
),
resp
.
content
.
decode
(
'utf-8'
))
self
.
assertIn
(
u"
Enroll in
{}"
.
format
(
self
.
course
.
id
.
course
),
resp
.
content
.
decode
(
'utf-8'
))
# Check that registration button is present
self
.
assertIn
(
REG_STR
,
resp
.
content
)
...
...
@@ -330,26 +330,26 @@ class AboutTestCaseShibCourse(LoginEnrollmentTestCase, ModuleStoreTestCase):
def
test_logged_in_shib_course
(
self
):
"""
For shib courses, logged in users will see the
register
button, but get rejected once they click there
For shib courses, logged in users will see the
enroll
button, but get rejected once they click there
"""
self
.
setup_user
()
url
=
reverse
(
'about_course'
,
args
=
[
self
.
course
.
id
.
to_deprecated_string
()])
resp
=
self
.
client
.
get
(
url
)
self
.
assertEqual
(
resp
.
status_code
,
200
)
self
.
assertIn
(
"OOGIE BLOOGIE"
,
resp
.
content
)
self
.
assertIn
(
u"
Register for
{}"
.
format
(
self
.
course
.
id
.
course
),
resp
.
content
.
decode
(
'utf-8'
))
self
.
assertIn
(
u"
Enroll in
{}"
.
format
(
self
.
course
.
id
.
course
),
resp
.
content
.
decode
(
'utf-8'
))
self
.
assertIn
(
SHIB_ERROR_STR
,
resp
.
content
)
self
.
assertIn
(
REG_STR
,
resp
.
content
)
def
test_anonymous_user_shib_course
(
self
):
"""
For shib courses, anonymous users will also see the
register
button
For shib courses, anonymous users will also see the
enroll
button
"""
url
=
reverse
(
'about_course'
,
args
=
[
self
.
course
.
id
.
to_deprecated_string
()])
resp
=
self
.
client
.
get
(
url
)
self
.
assertEqual
(
resp
.
status_code
,
200
)
self
.
assertIn
(
"OOGIE BLOOGIE"
,
resp
.
content
)
self
.
assertIn
(
u"
Register for
{}"
.
format
(
self
.
course
.
id
.
course
),
resp
.
content
.
decode
(
'utf-8'
))
self
.
assertIn
(
u"
Enroll in
{}"
.
format
(
self
.
course
.
id
.
course
),
resp
.
content
.
decode
(
'utf-8'
))
self
.
assertIn
(
SHIB_ERROR_STR
,
resp
.
content
)
self
.
assertIn
(
REG_STR
,
resp
.
content
)
...
...
@@ -472,7 +472,7 @@ class AboutPurchaseCourseTestCase(LoginEnrollmentTestCase, ModuleStoreTestCase):
resp
=
self
.
client
.
get
(
url
)
self
.
assertEqual
(
resp
.
status_code
,
200
)
self
.
assertIn
(
"You are
registered for
this course"
,
resp
.
content
)
self
.
assertIn
(
"You are
enrolled in
this course"
,
resp
.
content
)
self
.
assertIn
(
"View Courseware"
,
resp
.
content
)
self
.
assertNotIn
(
"Add buyme to Cart <span>($10 USD)</span>"
,
resp
.
content
)
...
...
@@ -538,7 +538,7 @@ class AboutPurchaseCourseTestCase(LoginEnrollmentTestCase, ModuleStoreTestCase):
# for paywalled courses
CourseEnrollment
.
enroll
(
self
.
user
,
course
.
id
)
# create a new account since the first account is already
registered for
the course
# create a new account since the first account is already
enrolled in
the course
email
=
'foo_second@test.com'
password
=
'bar'
username
=
'test_second'
...
...
lms/djangoapps/courseware/tests/test_microsites.py
View file @
895f4a36
...
...
@@ -212,14 +212,14 @@ class TestMicrosites(ModuleStoreTestCase, LoginEnrollmentTestCase):
url
=
reverse
(
'about_course'
,
args
=
[
self
.
course_with_visibility
.
id
.
to_deprecated_string
()])
resp
=
self
.
client
.
get
(
url
)
self
.
assertEqual
(
resp
.
status_code
,
200
)
self
.
assertIn
(
"
Register for
{}"
.
format
(
self
.
course_with_visibility
.
id
.
course
),
resp
.
content
)
self
.
assertIn
(
"
Enroll in
{}"
.
format
(
self
.
course_with_visibility
.
id
.
course
),
resp
.
content
)
self
.
assertNotIn
(
"Add {} to Cart ($10)"
.
format
(
self
.
course_with_visibility
.
id
.
course
),
resp
.
content
)
# now try on the microsite
url
=
reverse
(
'about_course'
,
args
=
[
self
.
course_with_visibility
.
id
.
to_deprecated_string
()])
resp
=
self
.
client
.
get
(
url
,
HTTP_HOST
=
settings
.
MICROSITE_TEST_HOSTNAME
)
self
.
assertEqual
(
resp
.
status_code
,
200
)
self
.
assertNotIn
(
"
Register for
{}"
.
format
(
self
.
course_with_visibility
.
id
.
course
),
resp
.
content
)
self
.
assertNotIn
(
"
Enroll in
{}"
.
format
(
self
.
course_with_visibility
.
id
.
course
),
resp
.
content
)
self
.
assertIn
(
"Add {} to Cart <span>($10 USD)</span>"
.
format
(
self
.
course_with_visibility
.
id
.
course
),
resp
.
content
)
...
...
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