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
91d3f4dd
Commit
91d3f4dd
authored
Jun 02, 2013
by
Chris Dodge
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add simple content check for the activation page when the user is not logged in
parent
87daba69
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
cms/djangoapps/contentstore/tests/tests.py
+12
-0
No files found.
cms/djangoapps/contentstore/tests/tests.py
View file @
91d3f4dd
...
@@ -111,6 +111,18 @@ class AuthTestCase(ContentStoreTestCase):
...
@@ -111,6 +111,18 @@ class AuthTestCase(ContentStoreTestCase):
# Now login should work
# Now login should work
self
.
login
(
self
.
email
,
self
.
pw
)
self
.
login
(
self
.
email
,
self
.
pw
)
def
test_login_link_on_activation_age
(
self
):
self
.
create_account
(
self
.
username
,
self
.
email
,
self
.
pw
)
# we want to test the rendering of the activation page when the user isn't logged in
self
.
client
.
logout
()
resp
=
self
.
_activate_user
(
self
.
email
)
self
.
assertEqual
(
resp
.
status_code
,
200
)
# check the the HTML has links to the right login page. Note that this is merely a content
# check and thus could be fragile should the wording change on this page
expected
=
'You can now <a href="'
+
reverse
(
'login'
)
+
'">login</a>.'
self
.
assertIn
(
expected
,
resp
.
content
)
def
test_private_pages_auth
(
self
):
def
test_private_pages_auth
(
self
):
"""Make sure pages that do require login work."""
"""Make sure pages that do require login work."""
auth_pages
=
(
auth_pages
=
(
...
...
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