Commit c8082770 by Don Mitchell Committed by Sarina Canelake

Change document_class back to dict

parent acc02b0e
......@@ -265,7 +265,7 @@ class TestCourseListing(ModuleStoreTestCase):
course_db_record = modulestore()._find_one(course.location)
course_db_record.setdefault('metadata', {}).get('tabs', []).append({"type": "wiko", "name": "Wiki" })
modulestore().collection.update(
{'_id': course_db_record['_id']},
{'_id': course.location.to_deprecated_son()},
{'$set': {
'metadata.tabs': course_db_record['metadata']['tabs'],
}},
......
......@@ -107,7 +107,7 @@ class TestCourseListing(ModuleStoreTestCase):
course_db_record = modulestore('direct')._find_one(course.location)
course_db_record.setdefault('metadata', {}).get('tabs', []).append({"type": "wiko", "name": "Wiki" })
modulestore('direct').collection.update(
{'_id': course_db_record['_id']},
{'_id': course.location.to_deprecated_son()},
{'$set': {
'metadata.tabs': course_db_record['metadata']['tabs'],
}},
......
......@@ -29,7 +29,7 @@ class MongoContentStore(ContentStore):
pymongo.MongoClient(
host=host,
port=port,
document_class=SON,
document_class=dict,
**kwargs
),
db
......
......@@ -295,8 +295,7 @@ class MongoModuleStore(ModuleStoreWriteBase):
host=host,
port=port,
tz_aware=tz_aware,
# deserialize dicts as SONs
document_class=SON,
document_class=dict,
**kwargs
),
db
......
......@@ -99,7 +99,6 @@ class TestMixedModuleStore(LocMapperSetupSansDjango):
host=self.HOST,
port=self.PORT,
tz_aware=True,
document_class=bson.son.SON,
)
self.connection.drop_database(self.DB)
self.addCleanup(self.connection.drop_database, self.DB)
......
......@@ -66,7 +66,7 @@ class TestMongoModuleStore(unittest.TestCase):
host=HOST,
port=PORT,
tz_aware=True,
document_class=bson.son.SON,
document_class=dict,
)
cls.connection.drop_database(DB)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment