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
8d858ecb
Commit
8d858ecb
authored
Jul 01, 2013
by
Chris Dodge
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add a unit test to exercise the preview_component AJAX callback in the CMS
parent
63ed16e1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
cms/djangoapps/contentstore/tests/test_contentstore.py
+15
-0
No files found.
cms/djangoapps/contentstore/tests/test_contentstore.py
View file @
8d858ecb
...
@@ -344,6 +344,21 @@ class ContentStoreToyCourseTest(ModuleStoreTestCase):
...
@@ -344,6 +344,21 @@ class ContentStoreToyCourseTest(ModuleStoreTestCase):
err_cnt
=
perform_xlint
(
'common/test/data'
,
[
'full'
])
err_cnt
=
perform_xlint
(
'common/test/data'
,
[
'full'
])
self
.
assertGreater
(
err_cnt
,
0
)
self
.
assertGreater
(
err_cnt
,
0
)
def
test_module_preview
(
self
):
'''
Tests the ajax callback to render an XModule
'''
direct_store
=
modulestore
(
'direct'
)
import_from_xml
(
direct_store
,
'common/test/data/'
,
[
'full'
])
html_module_location
=
Location
([
'i4x'
,
'edX'
,
'full'
,
'html'
,
'html_90'
,
None
])
url
=
reverse
(
'preview_component'
,
kwargs
=
{
'location'
:
html_module_location
.
url
()})
resp
=
self
.
client
.
get
(
url
)
self
.
assertEqual
(
resp
.
status_code
,
200
)
self
.
assertIn
(
'Inline content'
,
resp
.
content
)
def
test_delete
(
self
):
def
test_delete
(
self
):
direct_store
=
modulestore
(
'direct'
)
direct_store
=
modulestore
(
'direct'
)
import_from_xml
(
direct_store
,
'common/test/data/'
,
[
'full'
])
import_from_xml
(
direct_store
,
'common/test/data/'
,
[
'full'
])
...
...
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