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
90ce6967
Commit
90ce6967
authored
Dec 20, 2012
by
cahrens
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix for Studio #96.
parent
6ec046ce
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
0 deletions
+18
-0
cms/djangoapps/contentstore/tests/test_utils.py
+18
-0
No files found.
cms/djangoapps/contentstore/tests/test_utils.py
0 → 100644
View file @
90ce6967
from
django.test.testcases
import
TestCase
from
cms.djangoapps.contentstore
import
utils
import
mock
class
LMSLinksTestCase
(
TestCase
):
def
about_page_test
(
self
):
location
=
'i4x'
,
'mitX'
,
'101'
,
'course'
,
'test'
utils
.
get_course_id
=
mock
.
Mock
(
return_value
=
"mitX/101/test"
)
link
=
utils
.
get_lms_link_for_about_page
(
location
)
self
.
assertEquals
(
link
,
"//localhost:8000/courses/mitX/101/test/about"
)
def
ls_link_test
(
self
):
location
=
'i4x'
,
'mitX'
,
'101'
,
'vertical'
,
'contacting_us'
utils
.
get_course_id
=
mock
.
Mock
(
return_value
=
"mitX/101/test"
)
link
=
utils
.
get_lms_link_for_item
(
location
,
False
)
self
.
assertEquals
(
link
,
"//localhost:8000/courses/mitX/101/test/jump_to/i4x://mitX/101/vertical/contacting_us"
)
link
=
utils
.
get_lms_link_for_item
(
location
,
True
)
self
.
assertEquals
(
link
,
"//preview.localhost:8000/courses/mitX/101/test/jump_to/i4x://mitX/101/vertical/contacting_us"
)
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