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
d2632227
Commit
d2632227
authored
Jul 11, 2013
by
JonahStanley
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed all but one test
parent
676da2d5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
12 deletions
+6
-12
cms/djangoapps/contentstore/tests/test_contentstore.py
+5
-12
cms/djangoapps/contentstore/tests/test_course_settings.py
+1
-0
No files found.
cms/djangoapps/contentstore/tests/test_contentstore.py
View file @
d2632227
...
...
@@ -351,6 +351,7 @@ class ContentStoreToyCourseTest(ModuleStoreTestCase):
err_cnt
=
perform_xlint
(
'common/test/data'
,
[
'toy'
])
self
.
assertGreater
(
err_cnt
,
0
)
#FIX
@override_settings
(
COURSES_WITH_UNSAFE_CODE
=
[
'edX/full/.*'
])
def
test_module_preview_in_whitelist
(
self
):
'''
...
...
@@ -373,7 +374,6 @@ class ContentStoreToyCourseTest(ModuleStoreTestCase):
resp
=
self
.
client
.
get
(
url
)
self
.
assertEqual
(
resp
.
status_code
,
200
)
#FIX
def
test_delete
(
self
):
direct_store
=
modulestore
(
'direct'
)
CourseFactory
.
create
(
org
=
'edX'
,
course
=
'999'
,
display_name
=
'Robot Super Course'
)
...
...
@@ -643,6 +643,7 @@ class ContentStoreToyCourseTest(ModuleStoreTestCase):
resp
=
self
.
client
.
get
(
'http://localhost:8001/c4x/CDX/123123/asset/&images_circuits_Lab7Solution2.png'
)
self
.
assertEqual
(
resp
.
status_code
,
400
)
#FIX
def
test_delete_course
(
self
):
"""
This test will import a course, make a draft item, and delete it. This will also assert that the
...
...
@@ -653,17 +654,13 @@ class ContentStoreToyCourseTest(ModuleStoreTestCase):
content_store
=
contentstore
()
draft_store
=
modulestore
(
'draft'
)
import_from_xml
(
module_store
,
'common/test/data/'
,
[
'
full
'
],
static_content_store
=
content_store
)
import_from_xml
(
module_store
,
'common/test/data/'
,
[
'
toy
'
],
static_content_store
=
content_store
)
location
=
CourseFactory
.
create
(
org
=
'MITx'
,
course
=
'999'
,
display_name
=
'Robot Super Course'
)
.
location
# verify that we actually have assets
assets
=
content_store
.
get_all_content_for_course
(
location
)
self
.
assertNotEquals
(
len
(
assets
),
0
)
# get a vertical (and components in it) to put into 'draft'
vertical
=
module_store
.
get_item
(
Location
([
'i4x'
,
'edX'
,
'
full
'
,
'vertical'
,
'vertical_
66
'
,
None
]),
depth
=
1
)
vertical
=
module_store
.
get_item
(
Location
([
'i4x'
,
'edX'
,
'
toy
'
,
'vertical'
,
'vertical_
test
'
,
None
]),
depth
=
1
)
draft_store
.
clone_item
(
vertical
.
location
,
vertical
.
location
)
for
child
in
vertical
.
get_children
():
...
...
@@ -672,13 +669,9 @@ class ContentStoreToyCourseTest(ModuleStoreTestCase):
# delete the course
delete_course
(
module_store
,
content_store
,
location
,
commit
=
True
)
<<<<<<<
HEAD
# assert that there's absolutely no non-draft modules in the course
# this should also include all draft items
items
=
draft_store
.
get_items
(
Location
([
'i4x'
,
'edX'
,
'full'
,
None
,
None
]))
=======
items
=
module_store
.
get_items
(
Location
([
'i4x'
,
'edX'
,
'999'
,
'course'
,
None
]))
>>>>>>>
69
dc373
...
All
cms
unit
test
no
longer
rely
on
the
full
course
.
self
.
assertEqual
(
len
(
items
),
0
)
# assert that all content in the asset library is also deleted
...
...
cms/djangoapps/contentstore/tests/test_course_settings.py
View file @
d2632227
...
...
@@ -14,6 +14,7 @@ from xmodule.modulestore import Location
from
models.settings.course_details
import
(
CourseDetails
,
CourseSettingsEncoder
)
from
models.settings.course_grading
import
CourseGradingModel
from
contentstore.utils
import
get_modulestore
from
xmodule.modulestore.tests.factories
import
CourseFactory
from
models.settings.course_metadata
import
CourseMetadata
...
...
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