The SlackAPIFileOperator is not straight forward and it might be better to add an example DAG to demonstrate the usage.

tests/providers/slack/operators/test_slack.py
#
#
#
import json
import unittest
from unittest import mock
from airflow.providers.slack.operators.slack import SlackAPIFileOperator, SlackAPIPostOperator
class TestSlackAPIPostOperator(unittest.TestCase):
    def setUp(self):
        self.test_username = 'test_username'
        self.test_channel = '#test_slack_channel'
        self.test_text = 'test_text'
        self.test_icon_url = 'test_icon_url'
        self.test_attachments = [
            {
                "fallback": "Required plain-text summary of the attachment.",
                "color": "#36a64f",
                "pretext": "Optional text that appears above the attachment block",
                "author_name": "Bobby Tables",
                "author_link": "http://flickr.com/bobby/",
                "author_icon": "http://flickr.com/icons/bobby.jpg",
                "title": "Slack API Documentation",
                "title_link": "https://api.slack.com/",
                "text": "Optional text that appears within the attachment",
                "fields": [{"title": "Priority", "value": "High", "short": 'false'}],
                "image_url": "http://my-website.com/path/to/image.jpg",
                "thumb_url": "http://example.com/path/to/thumb.png",
                "footer": "Slack API",