def check_attribute(self, name, paginator, expected, params):
        got = getattr(paginator, name)
        self.assertEqual(expected, got,
            "For '%s', expected %s but got %s.  Paginator parameters were: %s"
            % (name, expected, got, params))
Helper method that checks a single attribute and gives a nice error
dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.4/tests/regressiontests/pagination_regress/tests.py/PaginatorTests.check_attribute