Skip to main content

slacktools-slackfixtures

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

Install:

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()

    slack.chat_postMessage.assert_called_once()
    assert response.data == 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(
        path="myapp.tasks.slack",
        method="chat_postMessage", 
        response_data=response_data, 
        validates=False
    )
    response = post_message()

    with pytest.raises(SlackApiError):
        response.validate()

Metadata

Release files for slacktools-slackfixtures 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for slacktools-slackfixtures 1.0.0
File Size Uploaded Provenance Actions
slacktools-slackfixtures-1.0.0.tar.gz 3.5 kB Without provenance Details for slacktools-slackfixtures-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for slacktools-slackfixtures 1.0.0
File Interpreter ABI Platform Actions
slacktools_slackfixtures-1.0.0-py3-none-any.whl Python 3 none any Details for slacktools_slackfixtures-1.0.0-py3-none-any.whl

Total release size: 7.3 kB

Release files / slacktools-slackfixtures-1.0.0.tar.gz

Download URL slacktools-slackfixtures-1.0.0.tar.gz
Size 3.5 kB
Tags Source
SHA-256 checksum
How to use checksums
a306fafc360f42385382725027d37df7a0951fadb79c09eba87cdbd225dba977
BLAKE2b-256 checksum
How to use checksums
df0746f6f801267dfb166b267eb7a045ec6631f8a592135d035e62fa53e1bd10
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.8.1

Release files / slacktools_slackfixtures-1.0.0-py3-none-any.whl

Download URL slacktools_slackfixtures-1.0.0-py3-none-any.whl
Size 3.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1eb081bea4ecafb59d92bc932a8478aa0bef18e36a3e6bda84485f03bfb8b7cb
BLAKE2b-256 checksum
How to use checksums
ae92ccfa4e52020c422fa7ab4a26b0a8d0593b1ced0c5618af499507e5e8bfdd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.8.1

Security for slacktools-slackfixtures 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page