def setUp(self):
super(FileItemResourceTest, self).setUp()
# turn on streaming_support so that test_view can test the view endpoint
# without streaming_supported set to True, view endpoint will behave exactly like download
settings.FILESERVICE_CONFIG['streaming_supported'] = True
self.image_filename = 'image.jpg'
self.image_file = SimpleUploadedFile(
name=self.image_filename,
content='',
content_type='image/jpg',
)
self.upload_url = '/api/fileservice/'
self.download_url_template = '/api/fileservice/download/{0}'
self.view_url_template = '/api/fileservice/view/{0}'
评论列表
文章目录