mirror of
https://github.com/django/django.git
synced 2025-08-03 18:38:50 +00:00
Refs #24652 -- Used SimpleTestCase where appropriate.
This commit is contained in:
parent
e2b77acedd
commit
be67400b47
93 changed files with 362 additions and 340 deletions
|
@ -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()
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue