Skip to content

Commit

Permalink
Refs #26653 -- Fixed a feedgenerator test that requires a database qu…
Browse files Browse the repository at this point in the history
…ery on PostgreSQL.
  • Loading branch information
timgraham committed May 30, 2016
1 parent f31fbba commit 37aec6b
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions tests/utils_tests/test_feedgenerator.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
from __future__ import unicode_literals

import datetime
import unittest

from django.test import SimpleTestCase
from django.test import TestCase
from django.utils import feedgenerator
from django.utils.timezone import get_fixed_timezone, utc


class FeedgeneratorTest(SimpleTestCase):
class FeedgeneratorTest(unittest.TestCase):
"""
Tests for the low-level syndication feed framework.
"""
Expand Down Expand Up @@ -122,6 +123,10 @@ def test_feed_with_feed_url_gets_rendered_with_atom_link(self):
self.assertIn('href="/feed/"', 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):
for use_tz in (True, False):
with self.settings(USE_TZ=use_tz):
Expand Down

0 comments on commit 37aec6b

Please sign in to comment.