1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

Fixed #21977 -- Deprecated SimpleTestCase.urls

This commit is contained in:
Anubhav Joshi
2014-04-05 11:34:46 +05:30
committed by Tim Graham
parent d2f4553d70
commit cd914e31c9
73 changed files with 337 additions and 295 deletions

View File

@@ -5,7 +5,7 @@ import unittest
from django.core.exceptions import ImproperlyConfigured
from django.http import HttpResponse
from django.test import TestCase, RequestFactory
from django.test import TestCase, RequestFactory, override_settings
from django.views.generic import View, TemplateView, RedirectView
from . import views
@@ -238,8 +238,8 @@ class ViewTest(unittest.TestCase):
self.assertEqual(response.status_code, 405)
@override_settings(ROOT_URLCONF='generic_views.urls')
class TemplateViewTest(TestCase):
urls = 'generic_views.urls'
rf = RequestFactory()
@@ -327,8 +327,8 @@ class TemplateViewTest(TestCase):
self.assertEqual(response['Content-Type'], 'text/plain')
@override_settings(ROOT_URLCONF='generic_views.urls')
class RedirectViewTest(TestCase):
urls = 'generic_views.urls'
rf = RequestFactory()