'Tests if a `FieldDoesNotExist` exception is raised when
trying to instantiate a document with a field that\'s not
defined.'

def test_undefined_field_exception(self):

    class Doc(Document, ):
        foo = StringField()
    with self.assertRaises(FieldDoesNotExist):
        Doc(bar='test')
