'Test that TypedFileUploadParser raises an exception when parsing an
unsupported image format.'

def test_parse_unsupported_type(self):

    request = self.request_factory.post('/', content_type='image/tiff', HTTP_CONTENT_DISPOSITION='attachment;    filename="file.tiff"')
    context = {'view': self.view, 'request': request}
    with self.assertRaises(exceptions.UnsupportedMediaType):
        self.parser.parse(stream=BytesIO('abcdefgh'), media_type='image/tiff', parser_context=context)
