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
5e5f0c17
Commit
5e5f0c17
authored
Mar 13, 2017
by
Ned Batchelder
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
The exact version differs by open edx release
(cherry picked from commit 1c7f35d44a68010f3dd9110061e9ecc55a641043)
parent
fa5e2862
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
15 deletions
+15
-15
common/djangoapps/util/tests/test_help_context_processor.py
+15
-15
No files found.
common/djangoapps/util/tests/test_help_context_processor.py
View file @
5e5f0c17
...
...
@@ -33,34 +33,34 @@ class HelpContextProcessorTest(TestCase):
def
test_get_doc_url
(
self
):
# Test default values.
self
.
assert
Equal
(
"http://edx.readthedocs.io/projects/open-edx-learner-guide/en/latest/index.html"
,
self
.
_get_doc_url
()
self
.
assert
RegexpMatches
(
self
.
_get_doc_url
()
,
"http://edx.readthedocs.io/projects/open-edx-learner-guide/en/.*/index.html"
)
# Provide a known page_token.
self
.
assert
Equal
(
"http://edx.readthedocs.io/projects/open-edx-learner-guide/en/latest/sfd_dashboard_profile/index.html"
,
self
.
_get_doc_url
(
'profile'
)
self
.
assert
RegexpMatches
(
self
.
_get_doc_url
(
'profile'
)
,
"http://edx.readthedocs.io/projects/open-edx-learner-guide/en/.*/sfd_dashboard_profile/index.html"
)
# Use settings.DOC_LINK_BASE_URL to override default base_url.
with
patch
(
'django.conf.settings.DOC_LINK_BASE_URL'
,
'settings_base_url'
):
self
.
assert
Equal
(
"settings_base_url/en/latest/SFD_instructor_dash_help.html"
,
self
.
_get_doc_url
(
'instructor'
)
self
.
assert
RegexpMatches
(
self
.
_get_doc_url
(
'instructor'
)
,
"settings_base_url/en/.*/SFD_instructor_dash_help.html"
)
def
test_get_pdf_url
(
self
):
# Test default values.
self
.
assert
Equal
(
"https://media.readthedocs.org/pdf/open-edx-learner-guide/latest/open-edx-learner-guide.pdf"
,
self
.
_get_pdf_url
()
self
.
assert
RegexpMatches
(
self
.
_get_pdf_url
()
,
"https://media.readthedocs.org/pdf/open-edx-learner-guide/.*/open-edx-learner-guide.pdf"
)
# Use settings.DOC_LINK_BASE_URL to override default base_url.
with
patch
(
'django.conf.settings.DOC_LINK_BASE_URL'
,
'settings_base_url'
):
self
.
assert
Equal
(
"settings_base_url/latest/open-edx-learner-guide.pdf"
,
self
.
_get_pdf_url
()
self
.
assert
RegexpMatches
(
self
.
_get_pdf_url
()
,
"settings_base_url/.*/open-edx-learner-guide.pdf"
)
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