def test_default_iter(self):
        class DummyIter(dict):
            def __getattr__(self, name):
                return self[name]

        encoder = MongoengineEncoder()
        dummy_iter = DummyIter({'foo': 'bar'})
        self.assertEqual({'foo': 'bar'}, encoder.default(dummy_iter))
Test :py:meth:`.MongoengineEncoder.default` with iterable.
dataset/ETHPy150Open brocaar/flask-views/flask_views/tests/unit/db/mongoengine/test_json.py/MongoengineEncoderTestCase.test_default_iter