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

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

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

        assert expected_dump == content_dump
Enables blacklisted modules that help Jinja2 debugging.
dataset/ETHPy150Open django-json-api/django-rest-framework-json-api/example/tests/test_model_viewsets.py/ModelViewSetTests.test_page_two_in_list_result--crossover with--dataset/ETHPy150Open moraes/tipfy/project/app/main.py/enable_jinja2_debugging