diff --git a/zulip_bots/zulip_bots/bots/flock/fixtures/test_no_recipient_found.json b/zulip_bots/zulip_bots/bots/flock/fixtures/test_no_recipient_found.json index 4efab90..a7264bf 100644 --- a/zulip_bots/zulip_bots/bots/flock/fixtures/test_no_recipient_found.json +++ b/zulip_bots/zulip_bots/bots/flock/fixtures/test_no_recipient_found.json @@ -6,9 +6,12 @@ "token": "12345" } }, - "response": { - "error": "No user found. Make sure you typed it correctly." - }, + "response": [ + { + "id": 1, + "firstName": "user1" + } + ], "response-headers": { "content-type": "application/json; charset=utf-8" } diff --git a/zulip_bots/zulip_bots/bots/flock/test_flock.py b/zulip_bots/zulip_bots/bots/flock/test_flock.py index b5c1f14..f1cb4b2 100644 --- a/zulip_bots/zulip_bots/bots/flock/test_flock.py +++ b/zulip_bots/zulip_bots/bots/flock/test_flock.py @@ -37,10 +37,8 @@ right now.\nPlease try again later") self.verify_reply('Ricky: test message', "Uh-Oh, couldn\'t process the request \ right now.\nPlease try again later") - @patch('zulip_bots.bots.flock.flock.find_recipient_id') - def test_no_recipient_found(self, find_recipient: str) -> None: + def test_no_recipient_found(self) -> None: bot_response = "No user found. Make sure you typed it correctly." - find_recipient.return_value = None with self.mock_config_info(self.normal_config), \ self.mock_http_conversation('test_no_recipient_found'): self.verify_reply('david: hello', bot_response)