class Simple(model.RootObjectModel): i = model.Integer(thrift_id=1) @classmethod def generate_test_object(cls): obj = cls() obj.i = 123 return obj
class A(model.RootObjectModel): s = model.String(thrift_id=1) i = model.Integer(thrift_id=2) f = model.Float(thrift_id=3) bt = model.Boolean(thrift_id=4) bf = model.Boolean(thrift_id=5) def __eq__(self, other): return self.s == other.s and self.i == other.i and self.f == other.f
class Address(model.Model): street = model.String(thrift_id=1) number = model.Integer(thrift_id=2) postal_code = model.Integer(thrift_id=3) city = model.String(thrift_id=4)
class B(model.Model): i = model.Integer(thrift_id=1)
class Simple(base): i = model.Integer() s = model.String() b = model.Boolean()