Added test for meta[indexes]

This commit is contained in:
Harry Marr
2010-01-07 15:46:52 +00:00
parent a6d64b2010
commit 4c93e2945c
3 changed files with 27 additions and 3 deletions

View File

@@ -67,8 +67,6 @@ class Document(BaseDocument):
def reload(self):
"""Reloads all attributes from the database.
"""
#object_id = self._fields['id'].to_mongo(self.id)
#obj = self.__class__.objects(id=object_id).first()
obj = self.__class__.objects(id=self.id).first()
for field in self._fields:
setattr(self, field, getattr(obj, field))

View File

@@ -25,7 +25,7 @@ class QuerySet(object):
self._query = {'_types': self._document._class_name}
self._cursor_obj = None
def ensure_index(self, key_or_list, direction=None):
def ensure_index(self, key_or_list):
"""Ensure that the given indexes are in place.
"""
if isinstance(key_or_list, basestring):