flock: Refactor test_no_recipient_found
test to increase coverage.
This commit is contained in:
parent
80adce3cee
commit
7b3c083ab5
|
@ -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"
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue