From 6c2a78b26653739fe688dbf4d97b27aab1ebeca7 Mon Sep 17 00:00:00 2001 From: Adrian Holovaty Date: Tue, 18 Mar 2008 21:53:39 +0000 Subject: [PATCH] Changed pagination tests to suppress the DeprecationWarning git-svn-id: http://code.djangoproject.com/svn/django/trunk@7308 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- tests/modeltests/pagination/models.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/modeltests/pagination/models.py b/tests/modeltests/pagination/models.py index ca03e38573..277c5961e3 100644 --- a/tests/modeltests/pagination/models.py +++ b/tests/modeltests/pagination/models.py @@ -144,6 +144,10 @@ True # 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