Commit graph

22 commits

Author SHA1 Message Date
Anders Kaseorg
562fe610b7 cleanup: Fix whitespace around function annotation arrows.
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2020-04-18 20:31:14 -07:00
Anders Kaseorg
e30b3b094b Modernize legacy Python 2 syntax with pyupgrade.
Generated by `pyupgrade --py3-plus --keep-percent-format` followed by
manual indentation fixes.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2020-04-18 15:04:36 -07:00
neiljp (Neil Pilgrim)
6cdb83ce72 bot tests: Adjust TestCase inheritance to avoid need to skip/filter.
Previously the test-bots script filtered out base-class tests from
BotTestCase. With this change, BotTestCase continues to inherit from
unittest.TestCase, but the default test_* methods previously in this
class are now in a new DefaultTests class, which does not. Instead, each
bot needs to inherit from BotTestCase and DefaultTests *explicitly*.

This avoids the need to filter out the base-class tests, which
simplifies the test-bots script, and may ease any migration to eg.
pytest.

The DefaultTests class does require some non-implemented methods which
BotTestCase provides.
2018-06-09 12:49:49 -04:00
Eeshan Garg
246f065877 zulip_bots: Remove unnecessary requirements.txt files in /bots.
A lot of these were either empty or required 'requests', which
is already installed as part of the main 'zulip' package.
2018-06-04 19:59:59 -02:30
neiljp (Neil Pilgrim)
8e1d4f524b baremetrics: Remove extra newlines & spaces in code and tests. 2018-05-30 07:11:16 -04:00
neiljp (Neil Pilgrim)
b51b6d0361 baremetrics: Simplify response generation. 2018-05-30 07:11:16 -04:00
neiljp (Neil Pilgrim)
016011437e baremetrics: Simplify core handler code. 2018-05-30 07:11:16 -04:00
neiljp (Neil Pilgrim)
4e19a7716d mypy: Avoid 'Any' for message in bots.
Also remove a few unnecessary typing imports.
2018-05-30 07:11:16 -04:00
Dhruv Thakker
582b16861e baremetrics bot : Add tests for bad requests.
(This module now has 100% coverage.)
2018-03-08 08:27:32 -05:00
Robert Hönig
4ed31eb6fd baremetrics bot: Add fixture for invalid api key test.
This makes the baremetrics bot tests no longer rely on an
internet connection to succeed.
2018-02-06 15:27:45 +01:00
Viraat Chandra
d9fca54998 bots: Fix test failure for Baremetrics bot. 2018-01-24 11:19:44 +01:00
Viraat Chandra
2f429fcb86 zulip_bots: Add test for create-plan command of Baremetrics bot. 2018-01-16 12:24:26 -05:00
Viraat Chandra
94f82dfe4c zulip_bots: Add feature create-plan to Baremetrics bot. 2018-01-16 12:24:26 -05:00
Viraat Chandra
bffb8d0e16 Improve test coverage for Baremetrics bot. 2018-01-12 07:35:38 -05:00
Robert Hönig
fd51735bfc Add requirements.txt for each bot. 2018-01-06 16:39:52 +01:00
Robert Hönig
f4ee3d4009 Fix mypy errors. 2018-01-04 17:19:02 +01:00
Robert Hönig
f6f09202ac baremetrics bot: Quit on invalid API key. 2018-01-04 10:34:16 -05:00
Viraat Chandra
606b7f8adf zulip_bots: Add better test for list-subscriptions command of Baremetrics bot. 2017-12-31 10:16:48 -05:00
Viraat Chandra
e2a9a229a3 zulip_bots: Add better test for list-customers command of Baremetrics bot. 2017-12-31 10:16:48 -05:00
Viraat Chandra
777f6c55f8 zulip_bots: Add better test for list-plans command of Baremetrics bot. 2017-12-31 10:16:48 -05:00
Viraat Chandra
8e800d545b zulip_bots: Check API key on initialization for Baremetrics bot. 2017-12-29 23:33:10 +01:00
Viraat Chandra
d8c6cb7c0a interactive bots: Create Baremetrics bot. 2017-12-29 11:50:33 +01:00