diff --git a/cms/envs/test.py b/cms/envs/test.py index b391bcbe18..c64e0ef1e8 100644 --- a/cms/envs/test.py +++ b/cms/envs/test.py @@ -91,6 +91,7 @@ CONTENTSTORE = { 'DOC_STORE_CONFIG': { 'host': 'localhost', 'db': 'test_xcontent', + 'collection': 'dont_trip', }, # allow for additional options that can be keyed on a name, e.g. 'trashcan' 'ADDITIONAL_OPTIONS': { diff --git a/common/lib/xmodule/xmodule/contentstore/mongo.py b/common/lib/xmodule/xmodule/contentstore/mongo.py index 98756eccba..11e61e1106 100644 --- a/common/lib/xmodule/xmodule/contentstore/mongo.py +++ b/common/lib/xmodule/xmodule/contentstore/mongo.py @@ -16,8 +16,15 @@ import json class MongoContentStore(ContentStore): - def __init__(self, host, db, port=27017, user=None, password=None, bucket='fs', **kwargs): + # pylint: disable=W0613 + def __init__(self, host, db, port=27017, user=None, password=None, bucket='fs', collection=None, **kwargs): + """ + Establish the connection with the mongo backend and connect to the collections + + :param collection: ignores but provided for consistency w/ other doc_store_config patterns + """ logging.debug('Using MongoDB for static content serving at host={0} db={1}'.format(host, db)) + _db = Connection(host=host, port=port, **kwargs)[db] if user is not None and password is not None: