Refs #24652 -- Used SimpleTestCase where appropriate.

This commit is contained in:
Simon Charette 2015-04-17 17:38:20 -04:00
parent e2b77acedd
commit be67400b47
93 changed files with 362 additions and 340 deletions

View file

@ -6,7 +6,7 @@ import unittest
from django.core.exceptions import ImproperlyConfigured
from django.core.urlresolvers import resolve
from django.http import HttpResponse
from django.test import RequestFactory, TestCase, override_settings
from django.test import RequestFactory, SimpleTestCase, override_settings
from django.test.utils import require_jinja2
from django.views.generic import RedirectView, TemplateView, View
@ -241,7 +241,7 @@ class ViewTest(unittest.TestCase):
@override_settings(ROOT_URLCONF='generic_views.urls')
class TemplateViewTest(TestCase):
class TemplateViewTest(SimpleTestCase):
rf = RequestFactory()
@ -352,7 +352,7 @@ class TemplateViewTest(TestCase):
@override_settings(ROOT_URLCONF='generic_views.urls')
class RedirectViewTest(TestCase):
class RedirectViewTest(SimpleTestCase):
rf = RequestFactory()

View file

@ -5,7 +5,9 @@ import warnings
from django import forms
from django.core.exceptions import ImproperlyConfigured
from django.core.urlresolvers import reverse
from django.test import TestCase, ignore_warnings, override_settings
from django.test import (
SimpleTestCase, TestCase, ignore_warnings, override_settings,
)
from django.test.client import RequestFactory
from django.utils.deprecation import RemovedInDjango20Warning
from django.views.generic.base import View
@ -16,7 +18,7 @@ from .models import Artist, Author
from .test_forms import AuthorForm
class FormMixinTests(TestCase):
class FormMixinTests(SimpleTestCase):
def test_initial_data(self):
""" Test instance independence of initial data dict (see #16138) """
initial_1 = FormMixin().get_initial()
@ -97,7 +99,7 @@ class BasicFormTests(TestCase):
self.assertRedirects(res, '/list/authors/')
class ModelFormMixinTests(TestCase):
class ModelFormMixinTests(SimpleTestCase):
def test_get_form(self):
form_class = views.AuthorGetQuerySetFormView().get_form_class()
self.assertEqual(form_class._meta.model, Author)