154 self.assertEqual(rs.limit(2, offset=2).rows, [[14000, 'nico']]) |
154 self.assertEqual(rs.limit(2, offset=2).rows, [[14000, 'nico']]) |
155 self.assertEqual(rs.limit(2, offset=3).rows, []) |
155 self.assertEqual(rs.limit(2, offset=3).rows, []) |
156 |
156 |
157 def test_limit_2(self): |
157 def test_limit_2(self): |
158 with self.admin_access.web_request() as req: |
158 with self.admin_access.web_request() as req: |
159 # drop user from cache for the sake of this test |
|
160 req.drop_entity_cache(req.user.eid) |
|
161 rs = req.execute('Any E,U WHERE E is CWEType, E created_by U') |
159 rs = req.execute('Any E,U WHERE E is CWEType, E created_by U') |
162 # get entity on row 9. This will fill its created_by relation cache, |
160 # get entity on row 9. This will fill its created_by relation cache, |
163 # with cwuser on row 9 as well |
161 # with cwuser on row 9 as well |
164 e1 = rs.get_entity(9, 0) |
162 e1 = rs.get_entity(9, 0) |
165 # get entity on row 10. This will fill its created_by relation cache, |
163 # get entity on row 10. This will fill its created_by relation cache, |