Skip to main content

No project description provided

Project description


A pytest plugin that adds useful fixtures for testing Slack integrations.


pip install slacktools-slackfixtures

Example usage:

from myapp.tasks import post_message

def test_post_message(mock_slack):
    response_data = {"status": "OK"}
    slack = mock_slack(path="myapp.tasks.slack", method="chat_postMessage", response_data=response_data)
    response = post_message()

    assert == response_data

Test for failure:

import pytest
from slack.errors import SlackApiError

from myapp.tasks import post_message

def test_post_message_failure(mock_slack):
    response_data = {"status": "Not OK"}
    slack = mock_slack(
    response = post_message()

    with pytest.raises(SlackApiError):

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for slacktools-slackfixtures, version 1.0.0
Filename, size File type Python version Upload date Hashes
Filename, size slacktools_slackfixtures-1.0.0-py3-none-any.whl (3.8 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size slacktools-slackfixtures-1.0.0.tar.gz (3.5 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page