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
fa5e2862
Commit
fa5e2862
authored
Mar 13, 2017
by
Ned Batchelder
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplify HelpContextProcessorTest a little
(cherry picked from commit acee7b55aff0c73c08552199c536d84555bcaae4)
parent
be0fad1b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
8 deletions
+5
-8
common/djangoapps/util/tests/test_help_context_processor.py
+5
-8
No files found.
common/djangoapps/util/tests/test_help_context_processor.py
View file @
fa5e2862
...
...
@@ -21,9 +21,6 @@ class HelpContextProcessorTest(TestCase):
Tests for help_context_processor.py
"""
def
setUp
(
self
):
super
(
HelpContextProcessorTest
,
self
)
.
setUp
()
@staticmethod
def
_get_doc_url
(
page_token
=
None
):
""" Helper method for getting the doc url. """
...
...
@@ -38,32 +35,32 @@ class HelpContextProcessorTest(TestCase):
# Test default values.
self
.
assertEqual
(
"http://edx.readthedocs.io/projects/open-edx-learner-guide/en/latest/index.html"
,
HelpContextProcessorTest
.
_get_doc_url
()
self
.
_get_doc_url
()
)
# Provide a known page_token.
self
.
assertEqual
(
"http://edx.readthedocs.io/projects/open-edx-learner-guide/en/latest/sfd_dashboard_profile/index.html"
,
HelpContextProcessorTest
.
_get_doc_url
(
'profile'
)
self
.
_get_doc_url
(
'profile'
)
)
# Use settings.DOC_LINK_BASE_URL to override default base_url.
with
patch
(
'django.conf.settings.DOC_LINK_BASE_URL'
,
'settings_base_url'
):
self
.
assertEqual
(
"settings_base_url/en/latest/SFD_instructor_dash_help.html"
,
HelpContextProcessorTest
.
_get_doc_url
(
'instructor'
)
self
.
_get_doc_url
(
'instructor'
)
)
def
test_get_pdf_url
(
self
):
# Test default values.
self
.
assertEqual
(
"https://media.readthedocs.org/pdf/open-edx-learner-guide/latest/open-edx-learner-guide.pdf"
,
HelpContextProcessorTest
.
_get_pdf_url
()
self
.
_get_pdf_url
()
)
# Use settings.DOC_LINK_BASE_URL to override default base_url.
with
patch
(
'django.conf.settings.DOC_LINK_BASE_URL'
,
'settings_base_url'
):
self
.
assertEqual
(
"settings_base_url/latest/open-edx-learner-guide.pdf"
,
HelpContextProcessorTest
.
_get_pdf_url
()
self
.
_get_pdf_url
()
)
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