python-zulip-api/zulip_bots
Robert Hönig 60c3919deb bot tests: Allow raw responses in fixtures.
Previously, the responses set in bot test fixtures
where handled as JSON objects. This works fine for
most bot tests, because most of the APIs that bots
are calling return a JSON-formatted response object.
However, some, like Trello, do return raw data.
This hasn't been noticed so far, because the respective
Trello test needed internet access. Tests shouldn't
need internet access.
This commit makes that Trello test use a fixture. To
work properly, it also adds a way to make http_mock_config
parse the response object as raw data.
This can now be done by modifying the "is_raw_response"
property in a newly introduced "meta" object that can
be used to specify how a fixture should be handled.
2018-06-04 10:13:38 -07:00
..
zulip_bots bot tests: Allow raw responses in fixtures. 2018-06-04 10:13:38 -07:00
architecture.md zulip_bots: Update README.md. 2017-11-14 09:51:09 -08:00
README.md zulip_bots: Consolidate game-playing bots. 2018-01-22 11:30:31 -05:00
setup.py pypi: Release 0.4.7. 2018-05-21 20:02:43 -02:30

Zulip bots

This directory contains the source code for the zulip_bots PyPI package.

The Zulip documentation has guides on using Zulip's bot system and writing your own bots.

Directory structure

zulip_bots  # This directory
├───zulip_bots  # `zulip_bots` package.
│   ├───bots/  # Actively maintained and tested bots.
│   ├───bots_unmaintained/  # Unmaintained, potentially broken bots.
│   ├───game_handler.py  # Handles game-related bots.
│   ├───lib.py  # Backbone of run.py
│   ├───provision.py  # Creates a development environment.
│   ├───run.py  # Used to run bots.
│   ├───simple_lib.py  # Used for terminal testing.
│   ├───test_lib.py  # Backbone for bot unit tests.
│   ├───test_run.py  # Unit tests for run.py
│   └───terminal.py  # Used to test bots in the command line.
└───setup.py  # Script for packaging.