예제 #1
0
파일: tests.py 프로젝트: ArcTanSusan/django
 def test_not_modified(self):
     response = HttpResponseNotModified()
     self.assertEqual(response.status_code, 304)
     # 304 responses should not have content/content-type
     with self.assertRaises(AttributeError):
         response.content = "Hello dear"
     self.assertNotIn('content-type', response)
예제 #2
0
파일: tests.py 프로젝트: tedsunnyday/django
 def test_not_modified(self):
     response = HttpResponseNotModified()
     self.assertEqual(response.status_code, 304)
     # 304 responses should not have content/content-type
     with self.assertRaises(AttributeError):
         response.content = "Hello dear"
     self.assertNotIn('content-type', response)