                                 'CONTENT_TYPE': 'multipart/form-data; boundary=boundary',
                                 'CONTENT_LENGTH': len(payload),
                                 'wsgi.input': payload})
          self.assertEqual(request.POST, {'name': ['value']})
          self.assertRaises(RawPostDataException, lambda: request.body)
  
      def test_body_after_POST_multipart_related(self):
          """
          Reading body after parsing multipart that isn't form-data is allowed
          """
 
</s> remove         self.assertRaises(
            DatabaseError,
            list,
            Person.objects.all().select_for_update(nowait=True)
        )
 </s> add         with self.assertRaises(DatabaseError):
            list(Person.objects.all().select_for_update(nowait=True)) </s> remove         self.assertRaises(ImproperlyConfigured,
                          self.client.get,
                          '/syndication/articles/')
 </s> add         with self.assertRaises(ImproperlyConfigured):
            self.client.get('/syndication/articles/') </s> remove         self.assertRaises(TemplateDoesNotExist, self.client.get, '/render_no_template/')
 </s> add         with self.assertRaises(TemplateDoesNotExist):
            self.client.get('/render_no_template/') </s> remove         self.assertRaises(AttributeError, lambda: Book.objects)
 </s> add         with self.assertRaises(AttributeError):
            Book.objects </s> remove         self.assertRaises(
            DatabaseError,
            lambda: list(Thing.objects.all()),
        )
 </s> add         with self.assertRaises(DatabaseError):
            list(Thing.objects.all())
        with self.assertRaises(RawPostDataException):
            request.body
                                 'CONTENT_TYPE': 'multipart/form-data; boundary=boundary',
                                 'CONTENT_LENGTH': len(payload),
                                 'wsgi.input': payload})
          self.assertEqual(request.POST, {'name': ['value']})
        with self.assertRaises(RawPostDataException):
            request.body
  
      def test_body_after_POST_multipart_related(self):
          """
          Reading body after parsing multipart that isn't form-data is allowed
          """
keep keep keep keep replace keep keep keep keep keep
 Refs #26022 -- Used context manager version of assertRaises in tests. 
tests/requests/tests.py