From 7ebeffbcdcdea1f59ce000e7f42d7bc24a7b4344 Mon Sep 17 00:00:00 2001 From: Mateusz Mandera Date: Sat, 7 Sep 2024 23:01:34 +0200 Subject: [PATCH] test_bots: Remove misleading comment. This comment looks like an ancient leftover from early days (moved here in a test_bots extraction in 123b4c1877a7fe4e8dce0303f38e07db0e8d947b 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. --- zerver/tests/test_bots.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/zerver/tests/test_bots.py b/zerver/tests/test_bots.py index b4f97532bd..58ba3cd02a 100644 --- a/zerver/tests/test_bots.py +++ b/zerver/tests/test_bots.py @@ -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)