def test_inheritance(self):
        class A(six.with_metaclass(base.FieldMeta, base.BaseObj)):
            __swagger_fields__ = {'a': None}

        class B(six.with_metaclass(base.FieldMeta, A)):
            __swagger_fields__ = {'b': None}

        class C(six.with_metaclass(base.FieldMeta, B)):
            __swagger_fields__ = {'c': None}

        class D(six.with_metaclass(base.FieldMeta, C)):
            __swagger_fields__ = {'d': None}

        class Dx(base.Context):
            __swagger_ref_object__ = D

        obj = dict(a=1, b=2, c=3, d=4)
        tmp = {'t': {}}
        with Dx(tmp, 't') as ctx:
            ctx.parse(obj)

        d = tmp['t']
        self.assertEqual(d.a, 1)
        self.assertEqual(d.b, 2)
        self.assertEqual(d.c, 3)
        self.assertEqual(d.d, 4)
test case for multiple layers of inheritance of BaseObj
dataset/ETHPy150Open mission-liao/pyswagger/pyswagger/tests/test_base.py/SwaggerBaseTestCase.test_inheritance