浏览代码

Completed test coverage for django.core.paginator.

Marcelo Galigniana 2 年之前
父节点
当前提交
2a2503c2c1
共有 1 个文件被更改,包括 5 次插入0 次删除
  1. 5 0
      tests/pagination/tests.py

+ 5 - 0
tests/pagination/tests.py

@@ -320,6 +320,11 @@ class PaginationTests(SimpleTestCase):
             with self.subTest(page=page):
                 self.assertEqual(expected, list(next(page_iterator)))
 
+        self.assertEqual(
+            [str(page) for page in iter(paginator)],
+            ["<Page 1 of 2>", "<Page 2 of 2>"],
+        )
+
     def test_get_elided_page_range(self):
         # Paginator.validate_number() must be called:
         paginator = Paginator([1, 2, 3], 2)