def test_total_cached(self):
        qs = self.qs(10)
        p = self.pager(qs, 20, 1)

        p.total
        p.total

        self.assertEqual(qs.count.call_count, 1)
Checking total twice doesn't query db for count twice.
dataset/ETHPy150Open mozilla/moztrap/tests/view/lists/test_pagination.py/TestPager.test_total_cached