mirror of
https://github.com/django/django.git
synced 2025-10-26 07:06:08 +00:00
@@ -239,6 +239,7 @@ class QueryDictTests(unittest.TestCase):
|
||||
self.assertEqual(copy.copy(q).encoding, 'iso-8859-15')
|
||||
self.assertEqual(copy.deepcopy(q).encoding, 'iso-8859-15')
|
||||
|
||||
|
||||
class HttpResponseTests(unittest.TestCase):
|
||||
|
||||
def test_headers_type(self):
|
||||
@@ -414,6 +415,7 @@ class HttpResponseTests(unittest.TestCase):
|
||||
self.assertRaises(SuspiciousOperation,
|
||||
HttpResponsePermanentRedirect, url)
|
||||
|
||||
|
||||
class HttpResponseSubclassesTests(TestCase):
|
||||
def test_redirect(self):
|
||||
response = HttpResponseRedirect('/redirected/')
|
||||
@@ -448,6 +450,7 @@ class HttpResponseSubclassesTests(TestCase):
|
||||
content_type='text/html')
|
||||
self.assertContains(response, 'Only the GET method is allowed', status_code=405)
|
||||
|
||||
|
||||
class StreamingHttpResponseTests(TestCase):
|
||||
def test_streaming_response(self):
|
||||
r = StreamingHttpResponse(iter(['hello', 'world']))
|
||||
@@ -501,6 +504,7 @@ class StreamingHttpResponseTests(TestCase):
|
||||
with self.assertRaises(Exception):
|
||||
r.tell()
|
||||
|
||||
|
||||
class FileCloseTests(TestCase):
|
||||
|
||||
def setUp(self):
|
||||
@@ -566,6 +570,7 @@ class FileCloseTests(TestCase):
|
||||
self.assertTrue(file1.closed)
|
||||
self.assertTrue(file2.closed)
|
||||
|
||||
|
||||
class CookieTests(unittest.TestCase):
|
||||
def test_encode(self):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user