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
0c699182
Commit
0c699182
authored
Jun 10, 2013
by
Chris Dodge
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
move test so it doesn't split the tests from a helper method
parent
d9ce3162
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
11 deletions
+11
-11
cms/djangoapps/contentstore/tests/test_contentstore.py
+11
-11
No files found.
cms/djangoapps/contentstore/tests/test_contentstore.py
View file @
0c699182
...
...
@@ -108,17 +108,6 @@ class ContentStoreToyCourseTest(ModuleStoreTestCase):
for
expected
in
expected_types
:
self
.
assertIn
(
expected
,
resp
.
content
)
def
test_malformed_edit_unit_request
(
self
):
store
=
modulestore
(
'direct'
)
import_from_xml
(
store
,
'common/test/data/'
,
[
'simple'
])
# just pick one vertical
descriptor
=
store
.
get_items
(
Location
(
'i4x'
,
'edX'
,
'simple'
,
'vertical'
,
None
,
None
))[
0
]
location
=
descriptor
.
location
.
_replace
(
name
=
'.'
+
descriptor
.
location
.
name
)
resp
=
self
.
client
.
get
(
reverse
(
'edit_unit'
,
kwargs
=
{
'location'
:
location
.
url
()}))
self
.
assertEqual
(
resp
.
status_code
,
400
)
def
test_advanced_components_in_edit_unit
(
self
):
# This could be made better, but for now let's just assert that we see the advanced modules mentioned in the page
# response HTML
...
...
@@ -131,6 +120,17 @@ class ContentStoreToyCourseTest(ModuleStoreTestCase):
def
test_advanced_components_require_two_clicks
(
self
):
self
.
check_components_on_page
([
'videoalpha'
],
[
'Video Alpha'
])
def
test_malformed_edit_unit_request
(
self
):
store
=
modulestore
(
'direct'
)
import_from_xml
(
store
,
'common/test/data/'
,
[
'simple'
])
# just pick one vertical
descriptor
=
store
.
get_items
(
Location
(
'i4x'
,
'edX'
,
'simple'
,
'vertical'
,
None
,
None
))[
0
]
location
=
descriptor
.
location
.
_replace
(
name
=
'.'
+
descriptor
.
location
.
name
)
resp
=
self
.
client
.
get
(
reverse
(
'edit_unit'
,
kwargs
=
{
'location'
:
location
.
url
()}))
self
.
assertEqual
(
resp
.
status_code
,
400
)
def
check_edit_unit
(
self
,
test_course_name
):
import_from_xml
(
modulestore
(
'direct'
),
'common/test/data/'
,
[
test_course_name
])
...
...
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