'Ensure that a document may be saved in the database.'

def test_save(self):

    person = self.Person(name='Test    User', age=30)
    person.save()
    collection = self.db[self.Person._get_collection_name()]
    person_obj = collection.find_one({'name': 'Test    User'})
    self.assertEqual(person_obj['name'], 'Test    User')
    self.assertEqual(person_obj['age'], 30)
    self.assertEqual(person_obj['_id'], person.id)
    class Recipient(Document, ):
        email = EmailField(required=True)
    recipient = Recipient(email='not-an-email')
    self.assertRaises(ValidationError, recipient.save)
    recipient.save(validate=False)
