Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

[py3k] Fixed pagination_regress tests.

  • Loading branch information...
commit 37a894b48c857d89820e6e8f90436422a075f7ad 1 parent d69bd23
authored August 16, 2012
6  tests/regressiontests/pagination_regress/tests.py
@@ -17,14 +17,16 @@ def check_paginator(self, params, output):
17 17
         paginator = Paginator(*params)
18 18
         self.check_attribute('count', paginator, count, params)
19 19
         self.check_attribute('num_pages', paginator, num_pages, params)
20  
-        self.check_attribute('page_range', paginator, page_range, params)
  20
+        self.check_attribute('page_range', paginator, page_range, params, coerce=list)
21 21
 
22  
-    def check_attribute(self, name, paginator, expected, params):
  22
+    def check_attribute(self, name, paginator, expected, params, coerce=None):
23 23
         """
24 24
         Helper method that checks a single attribute and gives a nice error
25 25
         message upon test failure.
26 26
         """
27 27
         got = getattr(paginator, name)
  28
+        if coerce is not None:
  29
+            got = coerce(got)
28 30
         self.assertEqual(expected, got,
29 31
             "For '%s', expected %s but got %s.  Paginator parameters were: %s"
30 32
             % (name, expected, got, params))

0 notes on commit 37a894b

Please sign in to comment.
Something went wrong with that request. Please try again.