def test_pagination(self):
        count = 100
        page_size = 25
        pages = page_size / count
        users = ['Peter', 'Susan', 'Edmund', 'Lucy']

        for user in users:
            context = {'user': user}
            for i in range(count):
                self.access.add_or_update(FakeModelDB(name=uuid.uuid4().hex,
                                                      context=context, index=i))

        self.assertEqual(self.access.count(), len(users) * count)

        for user in users:
            for i in range(pages):
                offset = i * page_size
                objs = self.access.query(context__user=user, order_by=['index'],
                                         offset=offset, limit=page_size)
                self.assertEqual(len(objs), page_size)
                for j in range(page_size):
                    self.assertEqual(objs[j].context['user'], user)
                    self.assertEqual(objs[j].index, (i * page_size) + j)
dataset/ETHPy150Open StackStorm/st2/st2common/tests/unit/test_persistence.py/TestPersistence.test_pagination/swapped operands of `/`