Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed test suite after [7687].

git-svn-id: http://code.djangoproject.com/svn/django/trunk@7868 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit a616b9217408d57650fbb5a3d9e211d9a7f8ac6d 1 parent a724fff
Malcolm Tredinnick authored July 08, 2008

Showing 1 changed file with 8 additions and 8 deletions. Show diff stats Hide diff stats

  1. 16  tests/modeltests/pagination/models.py
16  tests/modeltests/pagination/models.py
@@ -31,7 +31,7 @@ def __unicode__(self):
31 31
 # New/current API (Paginator/Page) #
32 32
 ####################################
33 33
 
34  
->>> from django.core.paginator import Paginator, InvalidPage
  34
+>>> from django.core.paginator import Paginator
35 35
 >>> paginator = Paginator(Article.objects.all(), 5)
36 36
 >>> paginator.count
37 37
 9
@@ -82,15 +82,15 @@ def __unicode__(self):
82 82
 >>> p.end_index()
83 83
 9
84 84
 
85  
-# Invalid pages raise InvalidPage.
  85
+# Empty pages raise EmptyPage.
86 86
 >>> paginator.page(0)
87 87
 Traceback (most recent call last):
88 88
 ...
89  
-InvalidPage: ...
  89
+EmptyPage: ...
90 90
 >>> paginator.page(3)
91 91
 Traceback (most recent call last):
92 92
 ...
93  
-InvalidPage: ...
  93
+EmptyPage: ...
94 94
 
95 95
 # Empty paginators with allow_empty_first_page=True.
96 96
 >>> paginator = Paginator(Article.objects.filter(id=0), 5, allow_empty_first_page=True)
@@ -148,7 +148,7 @@ def __unicode__(self):
148 148
 >>> from warnings import filterwarnings
149 149
 >>> filterwarnings("ignore")
150 150
 
151  
->>> from django.core.paginator import ObjectPaginator, InvalidPage
  151
+>>> from django.core.paginator import ObjectPaginator, EmptyPage
152 152
 >>> paginator = ObjectPaginator(Article.objects.all(), 5)
153 153
 >>> paginator.hits
154 154
 9
@@ -181,15 +181,15 @@ def __unicode__(self):
181 181
 >>> paginator.last_on_page(1)
182 182
 9
183 183
 
184  
-# Invalid pages raise InvalidPage.
  184
+# Invalid pages raise EmptyPage.
185 185
 >>> paginator.get_page(-1)
186 186
 Traceback (most recent call last):
187 187
 ...
188  
-InvalidPage: ...
  188
+EmptyPage: ...
189 189
 >>> paginator.get_page(2)
190 190
 Traceback (most recent call last):
191 191
 ...
192  
-InvalidPage: ...
  192
+EmptyPage: ...
193 193
 
194 194
 # Empty paginators with allow_empty_first_page=True.
195 195
 >>> paginator = ObjectPaginator(Article.objects.filter(id=0), 5)

0 notes on commit a616b92

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