test_bots: Remove misleading comment.

This comment looks like an ancient leftover from early days (moved here
in a test_bots extraction in 123b4c1877 in
2017). Whatever its history, this comment and test name don't make sense
anymore. The response here is an error, not a silent success.

(cherry picked from commit 7ebeffbcdc)
This commit is contained in:
Mateusz Mandera 2024-09-07 23:01:34 +02:00 committed by Tim Abbott
parent 29fdaa2f8d
commit acfe06d59f
1 changed files with 3 additions and 4 deletions

View File

@ -580,14 +580,13 @@ class BotTest(ZulipTestCase, UploadSerializeMixin):
self.deactivate_bot()
self.assert_num_bots_equal(0)
def test_deactivate_bogus_bot(self) -> None:
"""Deleting a bogus bot will succeed silently."""
def test_deactivate_bot_invalid_id(self) -> None:
self.login("hamlet")
self.assert_num_bots_equal(0)
self.create_bot()
self.assert_num_bots_equal(1)
invalid_user_id = 1000
result = self.client_delete(f"/json/bots/{invalid_user_id}")
invalid_bot_id = 1000
result = self.client_delete(f"/json/bots/{invalid_bot_id}")
self.assert_json_error(result, "No such bot")
self.assert_num_bots_equal(1)