Add missing drop_collection in tests fields
This commit is contained in:
parent
b320064418
commit
c499133bbe
@ -1551,6 +1551,8 @@ class FieldTest(unittest.TestCase):
|
|||||||
name = StringField()
|
name = StringField()
|
||||||
preferences = EmbeddedDocumentField(PersonPreferences)
|
preferences = EmbeddedDocumentField(PersonPreferences)
|
||||||
|
|
||||||
|
Person.drop_collection()
|
||||||
|
|
||||||
person = Person(name='Test User')
|
person = Person(name='Test User')
|
||||||
person.preferences = 'My Preferences'
|
person.preferences = 'My Preferences'
|
||||||
self.assertRaises(ValidationError, person.validate)
|
self.assertRaises(ValidationError, person.validate)
|
||||||
@ -1583,6 +1585,8 @@ class FieldTest(unittest.TestCase):
|
|||||||
content = StringField()
|
content = StringField()
|
||||||
author = EmbeddedDocumentField(User)
|
author = EmbeddedDocumentField(User)
|
||||||
|
|
||||||
|
BlogPost.drop_collection()
|
||||||
|
|
||||||
post = BlogPost(content='What I did today...')
|
post = BlogPost(content='What I did today...')
|
||||||
post.author = PowerUser(name='Test User', power=47)
|
post.author = PowerUser(name='Test User', power=47)
|
||||||
post.save()
|
post.save()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user