def test_page_range_in_list_result(self):
        response = self.client.get(self.list_url, {'page_size': 2})
        self.assertEqual(response.status_code, 200)

        users = get_user_model().objects.all()
        expected = {
            'data': [
                {
                    'type': 'users',
                    'id': encoding.force_text(users[0].pk),
                    'attributes': {
                        'first-name': users[0].first_name,
                        'last-name': users[0].last_name,
                        'email': users[0].email
                    },
                },
                {
                    'type': 'users',
                    'id': encoding.force_text(users[1].pk),
                    'attributes': {
                        'first-name': users[1].first_name,
                        'last-name': users[1].last_name,
                        'email': users[1].email
                    },
                }
            ],
            'links': {
                'first': 'http://testserver/identities?page=1&page_size=2',
                'last': 'http://testserver/identities?page=1&page_size=2',
                'next': None,
                'prev': None
            },
            'meta': {
                'pagination': {
                    'page': 1,
                    'pages': 1,
                    'count': 2
                }
            }
        }

        content_dump = redump_json(response.content)
        expected_dump = dump_json(expected)

        assert expected_dump == content_dump
Called when a subscriptions retrieval request has been received.
dataset/ETHPy150Open django-json-api/django-rest-framework-json-api/example/tests/test_model_viewsets.py/ModelViewSetTests.test_page_range_in_list_result--crossover with--dataset/ETHPy150Open ralphm/wokkel/wokkel/iwokkel.py/IPubSubService.subscriptions