def create_fileshare(): """Create a fileshare with directory""" hook = AzureFileShareHook() hook.create_share(NAME) hook.create_directory(share_name=NAME, directory_name=DIRECTORY) exists = hook.check_for_directory(share_name=NAME, directory_name=DIRECTORY) if not exists: raise Exception
def test_create_share(self, mock_service): mock_instance = mock_service.return_value hook = AzureFileShareHook(wasb_conn_id='wasb_test_sas_token') hook.create_share('my_share') mock_instance.create_share.assert_called_once_with('my_share')
def create_share(cls, share_name: str, wasb_conn_id: str): hook = AzureFileShareHook(wasb_conn_id=wasb_conn_id) hook.create_share(share_name)