60c3919deb
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. |
||
---|---|---|
.. | ||
zulip_bots | ||
architecture.md | ||
README.md | ||
setup.py |
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.