Add missing drop_collection in tests fields

This commit is contained in:
Emmanuel Leblond 2016-02-19 00:11:30 +01:00
parent b320064418
commit c499133bbe

View File

@ -1551,6 +1551,8 @@ class FieldTest(unittest.TestCase):
name = StringField()
preferences = EmbeddedDocumentField(PersonPreferences)
Person.drop_collection()
person = Person(name='Test User')
person.preferences = 'My Preferences'
self.assertRaises(ValidationError, person.validate)
@ -1583,6 +1585,8 @@ class FieldTest(unittest.TestCase):
content = StringField()
author = EmbeddedDocumentField(User)
BlogPost.drop_collection()
post = BlogPost(content='What I did today...')
post.author = PowerUser(name='Test User', power=47)
post.save()