          paginator = Paginator(Article.objects.all(), 5)
          p = paginator.page(1)
          self.assertEqual("<Page 1 of 2>", six.text_type(p))
          self.assertQuerysetEqual(p.object_list, [
                  "<Article: Article 1>",
                  "<Article: Article 2>",
                  "<Article: Article 3>",
                  "<Article: Article 4>",
                  "<Article: Article 5>"
          ],
              ordered=False
          )
          self.assertTrue(p.has_next())
          self.assertFalse(p.has_previous())
 
</s> remove                 "<Article: Article 6>",
                "<Article: Article 7>",
                "<Article: Article 8>",
                "<Article: Article 9>"
 </s> add             "<Article: Article 6>",
            "<Article: Article 7>",
            "<Article: Article 8>",
            "<Article: Article 9>" </s> remove                 "<Article: Article 1>",
                "<Article: Article 2>",
 </s> add             "<Article: Article 1>",
            "<Article: Article 2>", </s> remove                     "<Article: John's second story>",
                    "<Article: Paul's story>",
                    "<Article: This is a test>",
 </s> add                 "<Article: John's second story>",
                "<Article: Paul's story>",
                "<Article: This is a test>", </s> remove                         reporter__in=Reporter.objects.filter(first_name='John').values('pk').query
                    ).distinct(),
 </s> add                 reporter__in=Reporter.objects.filter(first_name='John').values('pk').query
            ).distinct(), </s> remove                 "<Child4: d1>",
                "<Child4: f1>"
 </s> add             "<Child4: d1>",
            "<Child4: f1>"
            "<Article: Article 1>",
            "<Article: Article 2>",
            "<Article: Article 3>",
            "<Article: Article 4>",
            "<Article: Article 5>"
          paginator = Paginator(Article.objects.all(), 5)
          p = paginator.page(1)
          self.assertEqual("<Page 1 of 2>", six.text_type(p))
          self.assertQuerysetEqual(p.object_list, [
            "<Article: Article 1>",
            "<Article: Article 2>",
            "<Article: Article 3>",
            "<Article: Article 4>",
            "<Article: Article 5>"
            "<Article: Article 1>",
            "<Article: Article 2>",
            "<Article: Article 3>",
            "<Article: Article 4>",
            "<Article: Article 5>"
            "<Article: Article 1>",
            "<Article: Article 2>",
            "<Article: Article 3>",
            "<Article: Article 4>",
            "<Article: Article 5>"
            "<Article: Article 1>",
            "<Article: Article 2>",
            "<Article: Article 3>",
            "<Article: Article 4>",
            "<Article: Article 5>"
            "<Article: Article 1>",
            "<Article: Article 2>",
            "<Article: Article 3>",
            "<Article: Article 4>",
            "<Article: Article 5>"
          ],
              ordered=False
          )
          self.assertTrue(p.has_next())
          self.assertFalse(p.has_previous())
keep keep keep keep replace replace replace replace replace keep keep keep keep keep
 Fixed #21288 -- Fixed E126 pep8 warnings 
tests/pagination/tests.py