req.py
branchstable
changeset 7407 a78cc15227ef
parent 7121 c2badb6de3fe
child 7543 570522300e22
equal deleted inserted replaced
7405:8c752d113ebb 7407:a78cc15227ef
    86     def etype_rset(self, etype, size=1):
    86     def etype_rset(self, etype, size=1):
    87         """return a fake result set for a particular entity type"""
    87         """return a fake result set for a particular entity type"""
    88         rset = ResultSet([('A',)]*size, '%s X' % etype,
    88         rset = ResultSet([('A',)]*size, '%s X' % etype,
    89                          description=[(etype,)]*size)
    89                          description=[(etype,)]*size)
    90         def get_entity(row, col=0, etype=etype, req=self, rset=rset):
    90         def get_entity(row, col=0, etype=etype, req=self, rset=rset):
    91             return req.vreg.etype_class(etype)(req, rset, row, col)
    91             return req.vreg['etypes'].etype_class(etype)(req, rset, row, col)
    92         rset.get_entity = get_entity
    92         rset.get_entity = get_entity
    93         rset.req = self
    93         rset.req = self
    94         return rset
    94         return rset
    95 
    95 
    96     def eid_rset(self, eid, etype=None):
    96     def eid_rset(self, eid, etype=None):