zulip_bots: Store testing conversations in lists.

This enforces the use of a list of tuples for
conversations, as opposed to dicts.
This commit is contained in:
derAnfaenger 2017-10-24 11:14:09 +02:00
parent 8179b30873
commit 8761e47893
6 changed files with 32 additions and 39 deletions

View file

@ -61,11 +61,6 @@ class BotTestCase(TestCase):
# type: (Union[Sequence[Tuple[str, Any]], Dict[str, Any]], str, str, str, str, int, str, str) -> None
# To test send_message, Any would be a Dict type,
# to test send_reply, Any would be a str type.
if isinstance(expectations, dict):
expected = [(k, v) for k, v in expectations.items()]
else:
expected = expectations
if type not in ["private", "stream", "all"]:
logging.exception("check_expected_response expects type to be 'private', 'stream' or 'all'")