1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

Fixed #14436 -- Escalated 1.2 PendingDeprecationWarnings to DeprecationWarnings, and removed 1.1 deprecated code.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@14138 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Russell Keith-Magee
2010-10-11 12:20:07 +00:00
parent 5e5be2c44c
commit 1070c57b83
36 changed files with 98 additions and 146 deletions

View File

@@ -1,16 +1,15 @@
import datetime
import warnings
from xml.dom import minidom
from django.contrib.syndication import feeds, views
from django.core.exceptions import ImproperlyConfigured
from django.test import TestCase
from django.utils import tzinfo
from django.utils.feedgenerator import rfc2822_date, rfc3339_date
from models import Entry
from xml.dom import minidom
try:
set
except NameError:
from sets import Set as set
from models import Entry
class FeedTestCase(TestCase):
fixtures = ['feeddata.json']
@@ -315,6 +314,15 @@ class DeprecatedSyndicationFeedTest(FeedTestCase):
"""
Tests for the deprecated API (feed() view and the feed_dict etc).
"""
def setUp(self):
warnings.filterwarnings('ignore', category=DeprecationWarning,
module='django.contrib.syndication.feeds')
warnings.filterwarnings('ignore', category=DeprecationWarning,
module='django.contrib.syndication.views')
def tearDown(self):
warnings.resetwarnings()
warnings.simplefilter('ignore', PendingDeprecationWarning)
def test_empty_feed_dict(self):
"""