                  PageLink('http://testserver/', 1, True, False),
              ]
          }
          assert not self.pagination.display_page_controls
          assert isinstance(self.pagination.to_html(), six.text_type)
  
      def test_invalid_page(self):
          request = Request(factory.get('/', {'page': 'invalid'}))
          with pytest.raises(exceptions.NotFound):
              self.paginate_queryset(request)
 
</s> remove         assert field.run_validation(1) is 1
 </s> add         assert field.run_validation(1) == 1 </s> remove         assert response.content == six.b('')
 </s> add         assert response.content == b'' </s> remove                 'Invalid data. Expected a dictionary, but got %s.' % six.text_type.__name__
 </s> add                 'Invalid data. Expected a dictionary, but got str.', </s> remove         request = factory.patch('/{0}'.format(obj.pk), {'number_value': 98}, format='json')
 </s> add         request = factory.patch('/{}'.format(obj.pk), {'number_value': 98}, format='json') </s> remove         content = six.b('qwerty')
 </s> add         content = b'qwerty'
        assert isinstance(self.pagination.to_html(), str)
                  PageLink('http://testserver/', 1, True, False),
              ]
          }
          assert not self.pagination.display_page_controls
        assert isinstance(self.pagination.to_html(), str)
  
      def test_invalid_page(self):
          request = Request(factory.get('/', {'page': 'invalid'}))
          with pytest.raises(exceptions.NotFound):
              self.paginate_queryset(request)
keep keep keep keep replace keep keep keep keep keep
 Dropped Python 2 compatibility. (#6615)

Thanks to Jon Dufresne (@jdufresne) for review.

Co-authored-by: Asif Saif Uddin <auvipy@gmail.com>
Co-authored-by: Rizwan Mansuri <Rizwan@webbyfox.com> 
tests/test_pagination.py