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
bd71a2ce
Commit
bd71a2ce
authored
Aug 16, 2013
by
Chris Dodge
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add unit test for video_caption asset path
parent
1128f369
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
0 deletions
+14
-0
cms/djangoapps/contentstore/tests/test_contentstore.py
+14
-0
No files found.
cms/djangoapps/contentstore/tests/test_contentstore.py
View file @
bd71a2ce
...
...
@@ -400,6 +400,20 @@ class ContentStoreToyCourseTest(ModuleStoreTestCase):
resp
=
self
.
client
.
get
(
url
)
self
.
assertEqual
(
resp
.
status_code
,
200
)
def
test_video_module_caption_asset_path
(
self
):
'''
This verifies that a video caption url is as we expect it to be
'''
direct_store
=
modulestore
(
'direct'
)
import_from_xml
(
direct_store
,
'common/test/data/'
,
[
'toy'
])
# also try a custom response which will trigger the 'is this course in whitelist' logic
video_module_location
=
Location
([
'i4x'
,
'edX'
,
'toy'
,
'video'
,
'sample_video'
,
None
])
url
=
reverse
(
'preview_component'
,
kwargs
=
{
'location'
:
video_module_location
.
url
()})
resp
=
self
.
client
.
get
(
url
)
self
.
assertEqual
(
resp
.
status_code
,
200
)
self
.
assertContains
(
resp
,
'data-caption-asset-path="/c4x/edX/toy/asset/subs_"'
)
def
test_delete
(
self
):
direct_store
=
modulestore
(
'direct'
)
CourseFactory
.
create
(
org
=
'edX'
,
course
=
'999'
,
display_name
=
'Robot Super Course'
)
...
...
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