

def test_upload_object_no_content_type(self):

    def no_content_type(name):
        return (None, None)
    old_func = libcloud.utils.files.guess_file_mime_type
    libcloud.utils.files.guess_file_mime_type = no_content_type
    file_path = os.path.abspath(__file__)
    container = Container(name='fbc', extra={
        
    }, driver=self)
    object_name = 'ftu'
    obj = self.driver.upload_object(file_path=file_path, container=container, object_name=object_name)
    self.assertEqual(obj.name, object_name)
    libcloud.utils.files.guess_file_mime_type = old_func

dataset/ETHPy150Open apache/libcloud/libcloud/test/storage/test_atmos.py AtmosTests.test_upload_object_no_content_type/original