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
6272817c
Commit
6272817c
authored
Jan 26, 2015
by
cahrens
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tests fail with split modulestore.
Have not been able to work out why.
parent
5fb30f33
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
common/djangoapps/contentserver/tests/test.py
+6
-5
No files found.
common/djangoapps/contentserver/tests/test.py
View file @
6272817c
...
...
@@ -13,8 +13,8 @@ from django.test.utils import override_settings
from
xmodule.contentstore.django
import
contentstore
from
xmodule.modulestore.django
import
modulestore
from
opaque_keys.edx.locations
import
SlashSeparatedCourseKey
from
xmodule.modulestore.tests.django_utils
import
ModuleStoreTestCase
from
xmodule.modulestore
import
ModuleStoreEnum
from
xmodule.modulestore.xml_importer
import
import_from_xml
from
contentserver.middleware
import
parse_range_header
...
...
@@ -45,22 +45,23 @@ class ContentStoreToyCourseTest(ModuleStoreTestCase):
self
.
client
=
Client
()
self
.
contentstore
=
contentstore
()
store
=
modulestore
()
.
_get_modulestore_by_type
(
ModuleStoreEnum
.
Type
.
mongo
)
# pylint: disable=protected-access
self
.
course_key
=
SlashSeparatedCourseK
ey
(
'edX'
,
'toy'
,
'2012_Fall'
)
self
.
course_key
=
store
.
make_course_k
ey
(
'edX'
,
'toy'
,
'2012_Fall'
)
import_from_xml
(
modulestore
()
,
self
.
user
.
id
,
TEST_DATA_DIR
,
[
'toy'
],
store
,
self
.
user
.
id
,
TEST_DATA_DIR
,
[
'toy'
],
static_content_store
=
self
.
contentstore
,
verbose
=
True
)
# A locked asset
self
.
locked_asset
=
self
.
course_key
.
make_asset_key
(
'asset'
,
'sample_static.txt'
)
self
.
url_locked
=
self
.
locked_asset
.
to_deprecated_string
(
)
self
.
url_locked
=
unicode
(
self
.
locked_asset
)
self
.
contentstore
.
set_attr
(
self
.
locked_asset
,
'locked'
,
True
)
# An unlocked asset
self
.
unlocked_asset
=
self
.
course_key
.
make_asset_key
(
'asset'
,
'another_static.txt'
)
self
.
url_unlocked
=
self
.
unlocked_asset
.
to_deprecated_string
(
)
self
.
url_unlocked
=
unicode
(
self
.
unlocked_asset
)
self
.
length_unlocked
=
self
.
contentstore
.
get_attr
(
self
.
unlocked_asset
,
'length'
)
def
test_unlocked_asset
(
self
):
...
...
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