Improved update in test case for removing inheritance
This commit is contained in:
parent
91a0e499d9
commit
bda716ef9d
@ -431,7 +431,7 @@ class DocumentTest(unittest.TestCase):
|
|||||||
'allow_inheritance': False,
|
'allow_inheritance': False,
|
||||||
'indexes': ['name']
|
'indexes': ['name']
|
||||||
}
|
}
|
||||||
collection.update({}, {"$unset": {"_types": 1, "_cls": 1}}, False, True)
|
collection.update({}, {"$unset": {"_types": 1, "_cls": 1}}, multi=True)
|
||||||
|
|
||||||
# Confirm extra data is removed
|
# Confirm extra data is removed
|
||||||
obj = collection.find_one()
|
obj = collection.find_one()
|
||||||
@ -1948,14 +1948,14 @@ class DocumentTest(unittest.TestCase):
|
|||||||
def test_list_search_by_embedded(self):
|
def test_list_search_by_embedded(self):
|
||||||
class User(Document):
|
class User(Document):
|
||||||
username = StringField(required=True)
|
username = StringField(required=True)
|
||||||
|
|
||||||
meta = {'allow_inheritance': False}
|
meta = {'allow_inheritance': False}
|
||||||
|
|
||||||
class Comment(EmbeddedDocument):
|
class Comment(EmbeddedDocument):
|
||||||
comment = StringField()
|
comment = StringField()
|
||||||
user = ReferenceField(User,
|
user = ReferenceField(User,
|
||||||
required=True)
|
required=True)
|
||||||
|
|
||||||
meta = {'allow_inheritance': False}
|
meta = {'allow_inheritance': False}
|
||||||
|
|
||||||
class Page(Document):
|
class Page(Document):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user