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
b975d4d9
Commit
b975d4d9
authored
Mar 26, 2013
by
Calen Pennington
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix tests
parent
e0343342
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
cms/djangoapps/contentstore/tests/test_contentstore.py
+5
-5
No files found.
cms/djangoapps/contentstore/tests/test_contentstore.py
View file @
b975d4d9
...
@@ -211,7 +211,7 @@ class ContentStoreToyCourseTest(ModuleStoreTestCase):
...
@@ -211,7 +211,7 @@ class ContentStoreToyCourseTest(ModuleStoreTestCase):
new_loc
=
descriptor
.
location
.
_replace
(
org
=
'MITx'
,
course
=
'999'
)
new_loc
=
descriptor
.
location
.
_replace
(
org
=
'MITx'
,
course
=
'999'
)
print
"Checking {0} should now also be at {1}"
.
format
(
descriptor
.
location
.
url
(),
new_loc
.
url
())
print
"Checking {0} should now also be at {1}"
.
format
(
descriptor
.
location
.
url
(),
new_loc
.
url
())
resp
=
self
.
client
.
get
(
reverse
(
'edit_unit'
,
kwargs
=
{
'location'
:
new_loc
.
url
()}))
resp
=
self
.
client
.
get
(
reverse
(
'edit_unit'
,
kwargs
=
{
'location'
:
new_loc
.
url
()}))
self
.
assertEqual
(
resp
.
status_code
,
200
)
self
.
assertEqual
(
resp
.
status_code
,
200
)
def
test_delete_course
(
self
):
def
test_delete_course
(
self
):
import_from_xml
(
modulestore
(),
'common/test/data/'
,
[
'full'
])
import_from_xml
(
modulestore
(),
'common/test/data/'
,
[
'full'
])
...
@@ -328,11 +328,11 @@ class ContentStoreToyCourseTest(ModuleStoreTestCase):
...
@@ -328,11 +328,11 @@ class ContentStoreToyCourseTest(ModuleStoreTestCase):
self
.
assertEqual
(
wrapper
.
counter
,
4
)
self
.
assertEqual
(
wrapper
.
counter
,
4
)
# make sure we pre-fetched a known sequential which should be at depth=2
# make sure we pre-fetched a known sequential which should be at depth=2
self
.
assertTrue
(
Location
([
'i4x'
,
'edX'
,
'full'
,
'sequential'
,
self
.
assertTrue
(
Location
([
'i4x'
,
'edX'
,
'full'
,
'sequential'
,
'Administrivia_and_Circuit_Elements'
,
None
])
in
course
.
system
.
module_data
)
'Administrivia_and_Circuit_Elements'
,
None
])
in
course
.
system
.
module_data
)
# make sure we don't have a specific vertical which should be at depth=3
# make sure we don't have a specific vertical which should be at depth=3
self
.
assertFalse
(
Location
([
'i4x'
,
'edX'
,
'full'
,
'vertical'
,
'vertical_58'
,
self
.
assertFalse
(
Location
([
'i4x'
,
'edX'
,
'full'
,
'vertical'
,
'vertical_58'
,
None
])
in
course
.
system
.
module_data
)
None
])
in
course
.
system
.
module_data
)
def
test_export_course_with_unknown_metadata
(
self
):
def
test_export_course_with_unknown_metadata
(
self
):
...
@@ -556,7 +556,7 @@ class ContentStoreTest(ModuleStoreTestCase):
...
@@ -556,7 +556,7 @@ class ContentStoreTest(ModuleStoreTestCase):
module_store
.
update_children
(
parent
.
location
,
parent
.
children
+
[
new_component_location
.
url
()])
module_store
.
update_children
(
parent
.
location
,
parent
.
children
+
[
new_component_location
.
url
()])
# flush the cache
# flush the cache
module_store
.
get_cached_metadata_inheritance_tree
(
new_component_location
,
-
1
)
module_store
.
refresh_cached_metadata_inheritance_tree
(
new_component_location
)
new_module
=
module_store
.
get_item
(
new_component_location
)
new_module
=
module_store
.
get_item
(
new_component_location
)
# check for grace period definition which should be defined at the course level
# check for grace period definition which should be defined at the course level
...
@@ -571,7 +571,7 @@ class ContentStoreTest(ModuleStoreTestCase):
...
@@ -571,7 +571,7 @@ class ContentStoreTest(ModuleStoreTestCase):
module_store
.
update_metadata
(
new_module
.
location
,
own_metadata
(
new_module
))
module_store
.
update_metadata
(
new_module
.
location
,
own_metadata
(
new_module
))
# flush the cache and refetch
# flush the cache and refetch
module_store
.
get_cached_metadata_inheritance_tree
(
new_component_location
,
-
1
)
module_store
.
refresh_cached_metadata_inheritance_tree
(
new_component_location
)
new_module
=
module_store
.
get_item
(
new_component_location
)
new_module
=
module_store
.
get_item
(
new_component_location
)
self
.
assertEqual
(
timedelta
(
1
),
new_module
.
lms
.
graceperiod
)
self
.
assertEqual
(
timedelta
(
1
),
new_module
.
lms
.
graceperiod
)
...
...
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