This repository has been archived by the owner on Jun 8, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Pytest plugin
- Loading branch information
Showing
12 changed files
with
285 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,41 @@ | ||
========================================= | ||
:mod:`slack.tests.plugin` - Pytest plugin | ||
========================================= | ||
=========================================== | ||
:mod:`slack.tests.plugin` - Pytest fixtures | ||
=========================================== | ||
|
||
Slack-sansio provide a pytest plugin with some fixtures to facilitate testing of the slack API. | ||
|
||
|
||
Installation | ||
============ | ||
|
||
To load the plugin add the snippet below to your ``conftest.py``. | ||
|
||
.. code-block:: python | ||
pytest_plugins = "slack.tests.plugin", | ||
The ``slack_actions``, ``slack_commands`` and ``slack_events`` fixtures return sample of incoming actions, commands or | ||
events coming from slack. | ||
Available fixtures | ||
================== | ||
|
||
.. code-block:: python | ||
.. automodule:: slack.tests.plugin | ||
:members: | ||
|
||
|
||
Available data | ||
============== | ||
|
||
.. autoclass:: slack.tests.data.Events | ||
:members: | ||
|
||
.. autoclass:: slack.tests.data.Messages | ||
:members: | ||
|
||
.. autoclass:: slack.tests.data.Commands | ||
:members: | ||
|
||
async def test_event(self, slack_event): | ||
event = slack.events.Event.from_http(slack_event) | ||
.. autoclass:: slack.tests.data.Actions | ||
:members: | ||
|
||
.. autoclass:: slack.tests.data.Methods | ||
:members: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
# Version information | ||
|
||
__version__ = '0.3.3' | ||
__version__ = '0.3.4' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,4 @@ | ||
from . import events, methods, actions, commands # noQa | ||
from .actions import Actions # noQa F401 | ||
from .commands import Commands # noQa F401 | ||
from .events import Events, Messages # noQa F401 | ||
from .methods import Methods # noQa F401 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.