contrib_bots: Add check_expected_responses() test helper and use it.
This further simplifies the logic for testing a contrib_bots bot to require very little code per test in the common case.
This commit is contained in:
parent
536ab436ed
commit
1991e0128b
8 changed files with 63 additions and 97 deletions
|
@ -39,8 +39,4 @@ class TestXkcdBot(BotTestCase):
|
|||
"(https://imgs.xkcd.com/comics/chess_notation.png)"),
|
||||
"999999999": invalid_id_txt + "999999999",
|
||||
}
|
||||
for m, r in expected.items():
|
||||
self.assert_bot_output(
|
||||
{'content': m, 'type': "private", 'sender_email': "foo"}, r)
|
||||
self.assert_bot_output(
|
||||
{'content': m, 'type': "stream", 'sender_email': "foo"}, r)
|
||||
self.check_expected_responses(expected)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue