class IndexModel(RUnit): prefix = 'model' root = True lenght = rfield() store = StoreModel()
class SimpleModel(RUnit): root = True prefix = 'simple' field = rfield() hash = rhash() scroll = rlist() store = StoreModel()
class TestBuilding(RUnit): prefix = 'tbuilding' profit = rfield("profit") build_total = rfield("build_total") build_one = rfield("build_one") lock = rfield("lock") public = rfield("public") id = rfield("id") flash = rhash("flash")
def setUp(self): super(RfieldTest, self).setUp() self.unbound = rfield(int, 0) self.unbound.bound(self.model, 'field')
class SimpleModel(RUnit): name = rfield() uid = rfield(int)
class NestedModel(RUnit): some = rfield() nested = SimpleModel()
class NestedModel(TestModel): prefix = 'nested' name = rfield() nested = StoreModel()
class StoreModel(RUnit): prefix = 'storemodel' store = rfield(int)
class TestModel(RUnit): prefix = 'testmodel' root = True id = rfield(int) name = rfield(prefix='name')
class ItemModel(RUnit): name = rfield()
class ItemModel(RUnit): id = rfield(int) total = rfield(int) hash = rhash(int, 0)
class NewItem(RUnit): field = rfield() def new(self, value): self.field.set(value)
class StoreModel(RStore): assign = ItemModel prefix = 'store' name = rfield(str, 'default_name')