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
352e56eb
Commit
352e56eb
authored
Aug 19, 2013
by
Chris Dodge
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
address some pylint violations in the mixedmodulestore build report
parent
606e8b1d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
4 deletions
+17
-4
common/lib/xmodule/xmodule/modulestore/mixed.py
+1
-1
common/lib/xmodule/xmodule/modulestore/tests/test_mixed_modulestore.py
+15
-2
lms/envs/cms/mixed_dev.py
+1
-1
No files found.
common/lib/xmodule/xmodule/modulestore/mixed.py
View file @
352e56eb
...
...
@@ -7,7 +7,7 @@ IMPORTANT: This modulestore only supports READONLY applications, e.g. LMS
"""
from
.
import
ModuleStoreBase
from
django
import
create_modulestore_instance
from
xmodule.modulestore.
django
import
create_modulestore_instance
import
logging
log
=
logging
.
getLogger
(
__name__
)
...
...
common/lib/xmodule/xmodule/modulestore/tests/test_mixed_modulestore.py
View file @
352e56eb
...
...
@@ -13,7 +13,7 @@ HOST = 'localhost'
PORT
=
27017
DB
=
'test_mongo_
%
s'
%
uuid4
()
.
hex
COLLECTION
=
'modulestore'
FS_ROOT
=
DATA_DIR
# TODO (vshnayder): will need a real fs_root for testing load_item
FS_ROOT
=
DATA_DIR
DEFAULT_CLASS
=
'xmodule.raw_module.RawDescriptor'
RENDER_TEMPLATE
=
lambda
t_n
,
d
,
ctx
=
None
,
nsp
=
'main'
:
''
...
...
@@ -54,6 +54,9 @@ class TestMixedModuleStore(object):
'''Tests!'''
@classmethod
def
setupClass
(
cls
):
"""
Set up the database for testing
"""
cls
.
connection
=
pymongo
.
connection
.
Connection
(
HOST
,
PORT
)
cls
.
connection
.
drop_database
(
DB
)
cls
.
fake_location
=
Location
([
'i4x'
,
'foo'
,
'bar'
,
'vertical'
,
'baz'
])
...
...
@@ -66,10 +69,16 @@ class TestMixedModuleStore(object):
@classmethod
def
teardownClass
(
cls
):
"""
Clear out database after test has completed
"""
cls
.
destroy_db
(
cls
.
connection
)
@staticmethod
def
initdb
():
"""
Initialize the database and import one test course into it
"""
# connect to the db
_options
=
{}
_options
.
update
(
OPTIONS
)
...
...
@@ -92,7 +101,9 @@ class TestMixedModuleStore(object):
@staticmethod
def
destroy_db
(
connection
):
# Destroy the test db.
"""
Destroy the test db.
"""
connection
.
drop_database
(
DB
)
def
setUp
(
self
):
...
...
@@ -204,6 +215,7 @@ class TestMixedModuleStore(object):
module
=
self
.
store
.
get_course
(
XML_COURSEID2
)
assert_equals
(
module
.
location
.
course
,
'simple'
)
# pylint: disable=E1101
def
test_get_parent_locations
(
self
):
parents
=
self
.
store
.
get_parent_locations
(
Location
([
'i4x'
,
self
.
import_org
,
self
.
import_course
,
'chapter'
,
'Overview'
]),
...
...
@@ -223,6 +235,7 @@ class TestMixedModuleStore(object):
assert_equals
(
Location
(
parents
[
0
])
.
course
,
'toy'
)
assert_equals
(
Location
(
parents
[
0
])
.
name
,
'2012_Fall'
)
# pylint: disable=W0212
def
test_set_modulestore_configuration
(
self
):
config
=
{
'foo'
:
'bar'
}
self
.
store
.
set_modulestore_configuration
(
config
)
...
...
lms/envs/cms/mixed_dev.py
View file @
352e56eb
...
...
@@ -6,7 +6,7 @@ This configuration is to run the MixedModuleStore on a localdev environment
# want to import all variables from base settings files
# pylint: disable=W0401, W0614
from
.dev
import
*
,
DATA_DIR
from
.dev
import
*
MODULESTORE
=
{
'default'
:
{
...
...
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