summaryrefslogtreecommitdiff
path: root/tests/utils_tests
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2018-11-26 14:05:02 -0500
committerTim Graham <timograham@gmail.com>2018-11-27 08:58:44 -0500
commit193c109327c5216cab1d4eed6bfdff24629b09a3 (patch)
tree3428f61d610f51349df5ab6eb26a4876b54878c5 /tests/utils_tests
parentf091ea35150d95fc6732bbf0c27b971dd445509a (diff)
Switched TestCase to SimpleTestCase where possible in Django's tests.
Diffstat (limited to 'tests/utils_tests')
-rw-r--r--tests/utils_tests/test_feedgenerator.py9
-rw-r--r--tests/utils_tests/test_module_loading.py4
2 files changed, 4 insertions, 9 deletions
diff --git a/tests/utils_tests/test_feedgenerator.py b/tests/utils_tests/test_feedgenerator.py
index 45c669dcfa..3847637aba 100644
--- a/tests/utils_tests/test_feedgenerator.py
+++ b/tests/utils_tests/test_feedgenerator.py
@@ -1,12 +1,11 @@
import datetime
-import unittest
-from django.test import TestCase
+from django.test import SimpleTestCase
from django.utils import feedgenerator
from django.utils.timezone import get_fixed_timezone, utc
-class FeedgeneratorTest(unittest.TestCase):
+class FeedgeneratorTests(SimpleTestCase):
"""
Tests for the low-level syndication feed framework.
"""
@@ -131,10 +130,6 @@ class FeedgeneratorTest(unittest.TestCase):
feed_content = feed.writeString('utf-8')
self.assertIn('href="/link/" rel="alternate"', 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):
diff --git a/tests/utils_tests/test_module_loading.py b/tests/utils_tests/test_module_loading.py
index c114d84d88..ac54fd6b8e 100644
--- a/tests/utils_tests/test_module_loading.py
+++ b/tests/utils_tests/test_module_loading.py
@@ -4,7 +4,7 @@ import unittest
from importlib import import_module
from zipimport import zipimporter
-from django.test import SimpleTestCase, TestCase, modify_settings
+from django.test import SimpleTestCase, modify_settings
from django.test.utils import extend_sys_path
from django.utils.module_loading import (
autodiscover_modules, import_string, module_has_submodule,
@@ -119,7 +119,7 @@ class EggLoader(unittest.TestCase):
import_module('egg_module.sub1.sub2.no_such_module')
-class ModuleImportTestCase(TestCase):
+class ModuleImportTests(SimpleTestCase):
def test_import_string(self):
cls = import_string('django.utils.module_loading.import_string')
self.assertEqual(cls, import_string)