Permalink
Browse files

Changed pagination tests to suppress the DeprecationWarning

git-svn-id: http://code.djangoproject.com/svn/django/trunk@7308 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
adrianholovaty committed Mar 18, 2008
1 parent 08d4910 commit 6c2a78b26653739fe688dbf4d97b27aab1ebeca7
Showing with 4 additions and 0 deletions.
  1. +4 −0 tests/modeltests/pagination/models.py
@@ -144,6 +144,10 @@ def __unicode__(self):
# Legacy API (ObjectPaginator) #
################################
+# Don't print out the deprecation warnings during testing.
+>>> from warnings import filterwarnings
+>>> filterwarnings("ignore")
+
>>> from django.core.paginator import ObjectPaginator, InvalidPage
>>> paginator = ObjectPaginator(Article.objects.all(), 5)
>>> paginator.hits

0 comments on commit 6c2a78b

Please sign in to comment.