def test_upload_object_inexistent_file(self):
        def dummy_content_type(name):
            return 'application/zip', None

        old_func = libcloud.utils.guess_file_mime_type
        libcloud.utils.guess_file_mime_type = dummy_content_type

        file_path = os.path.abspath(__file__ + '.inexistent')
        container = Container(name='foo_bar_container', extra={}, driver=self)
        object_name = 'foo_test_upload'
        try:
            obj = self.driver.upload_object(file_path=file_path, container=container,
                                            object_name=object_name)
        except __HOLE__:
            pass
        else:
            self.fail('Inesitent but an exception was not thrown')
        finally:
            libcloud.utils.guess_file_mime_type = old_func
dataset/ETHPy150Open cloudkick/libcloud/test/storage/test_cloudfiles.py/CloudFilesTests.test_upload_object_inexistent_file