  
      def test_parse(self):
          """ Make sure the `QueryDict` works OK """
          parser = FileUploadParser()
          data_and_files = parser.parse(self.stream, parser_context=self.parser_context)
          file_obj = data_and_files.files['file']
          self.assertEqual(file_obj._size, 14)
 
</s> remove         self.parser_context = {'request': request}
 </s> add         self.parser_context = {'request': request, 'kwargs': {}} </s> remove         for i, handler in enumerate(request.upload_handlers):
 </s> add         for i, handler in enumerate(upload_handlers): </s> remove 
        try:
            disposition = parse_header(meta['HTTP_CONTENT_DISPOSITION'])
            filename = disposition[1]['filename']
        except KeyError:
            filename = None
 </s> add         upload_handlers = request.upload_handlers
        filename = self.get_filename(stream, media_type, parser_context) </s> remove         counters = [0] * len(request.upload_handlers)
 </s> add         counters = [0] * len(upload_handlers)
        self.stream.seek(0)
        data_and_files = parser.parse(self.stream, None, self.parser_context)
  
      def test_parse(self):
          """ Make sure the `QueryDict` works OK """
          parser = FileUploadParser()
        self.stream.seek(0)
        data_and_files = parser.parse(self.stream, None, self.parser_context)
          file_obj = data_and_files.files['file']
          self.assertEqual(file_obj._size, 14)
keep keep keep keep replace keep keep
 Codebase improvements on FileUploadParser

* Added docstrings.
* Added `FileUploadParser.get_filename` to make it easier to override.
* Added url kwargs filename detection step.
* Updated tests corresponding to these changes. 
rest_framework/tests/parsers.py