mirror of https://github.com/django/django.git
Refs #26653 -- Fixed a feedgenerator test that requires a database query on PostgreSQL.
This commit is contained in:
parent
f31fbbae1a
commit
37aec6b186
|
@ -1,13 +1,14 @@
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
import datetime
|
import datetime
|
||||||
|
import unittest
|
||||||
|
|
||||||
from django.test import SimpleTestCase
|
from django.test import TestCase
|
||||||
from django.utils import feedgenerator
|
from django.utils import feedgenerator
|
||||||
from django.utils.timezone import get_fixed_timezone, utc
|
from django.utils.timezone import get_fixed_timezone, utc
|
||||||
|
|
||||||
|
|
||||||
class FeedgeneratorTest(SimpleTestCase):
|
class FeedgeneratorTest(unittest.TestCase):
|
||||||
"""
|
"""
|
||||||
Tests for the low-level syndication feed framework.
|
Tests for the low-level syndication feed framework.
|
||||||
"""
|
"""
|
||||||
|
@ -122,6 +123,10 @@ class FeedgeneratorTest(SimpleTestCase):
|
||||||
self.assertIn('href="/feed/"', feed_content)
|
self.assertIn('href="/feed/"', feed_content)
|
||||||
self.assertIn('rel="self"', feed_content)
|
self.assertIn('rel="self"', feed_content)
|
||||||
|
|
||||||
|
|
||||||
|
class FeedgeneratorDBTest(TestCase):
|
||||||
|
|
||||||
|
# setting the timezone requires a database query on PostgreSQL.
|
||||||
def test_latest_post_date_returns_utc_time(self):
|
def test_latest_post_date_returns_utc_time(self):
|
||||||
for use_tz in (True, False):
|
for use_tz in (True, False):
|
||||||
with self.settings(USE_TZ=use_tz):
|
with self.settings(USE_TZ=use_tz):
|
||||||
|
|
Loading…
Reference in New Issue