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
f90ed69c
Commit
f90ed69c
authored
Jun 18, 2013
by
Jay Zoldak
Committed by
JonahStanley
Jun 21, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
move override of MODULESTORE settings into ModuleStore test case class
parent
e4af7287
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
cms/djangoapps/contentstore/tests/test_contentstore.py
+6
-4
No files found.
cms/djangoapps/contentstore/tests/test_contentstore.py
View file @
f90ed69c
...
...
@@ -45,9 +45,7 @@ import datetime
from
pytz
import
UTC
#from uuid import uuid4
TEST_DATA_MODULESTORE
=
copy
.
deepcopy
(
settings
.
MODULESTORE
)
TEST_DATA_MODULESTORE
[
'default'
][
'OPTIONS'
][
'fs_root'
]
=
path
(
'common/test/data'
)
TEST_DATA_MODULESTORE
[
'direct'
][
'OPTIONS'
][
'fs_root'
]
=
path
(
'common/test/data'
)
TEST_DATA_CONTENTSTORE
=
copy
.
deepcopy
(
settings
.
CONTENTSTORE
)
TEST_DATA_CONTENTSTORE
[
'OPTIONS'
][
'db'
]
=
'test_xcontent_
%
s'
%
4
#uuid4().hex
...
...
@@ -62,7 +60,7 @@ class MongoCollectionFindWrapper(object):
return
self
.
original
(
query
,
*
args
,
**
kwargs
)
@override_settings
(
MODULESTORE
=
TEST_DATA_MODULESTORE
)
#
@override_settings(MODULESTORE=TEST_DATA_MODULESTORE)
@override_settings
(
CONTENTSTORE
=
TEST_DATA_CONTENTSTORE
)
class
ContentStoreToyCourseTest
(
ModuleStoreTestCase
):
"""
...
...
@@ -70,6 +68,9 @@ class ContentStoreToyCourseTest(ModuleStoreTestCase):
TODO: refactor using CourseFactory so they do not.
"""
def
setUp
(
self
):
settings
.
MODULESTORE
[
'default'
][
'OPTIONS'
][
'fs_root'
]
=
path
(
'common/test/data'
)
settings
.
MODULESTORE
[
'direct'
][
'OPTIONS'
][
'fs_root'
]
=
path
(
'common/test/data'
)
uname
=
'testuser'
email
=
'test+courses@edx.org'
password
=
'foo'
...
...
@@ -88,6 +89,7 @@ class ContentStoreToyCourseTest(ModuleStoreTestCase):
self
.
client
.
login
(
username
=
uname
,
password
=
password
)
def
check_components_on_page
(
self
,
component_types
,
expected_types
):
"""
Ensure that the right types end up on the page.
...
...
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