botserver: Strip messages like we do in zulip-run-bot.
Previously, messages weren't stripped at all. This caused most bots to break and send replies similar to "I didn't understand your command". Nobody noticed, because the tests were only validating that replies were sent, but not the content in them. Thus, this commit also adds tests to avoid further regressions.
This commit is contained in:
parent
f1bcf3b9a4
commit
e6ef34a964
3 changed files with 27 additions and 11 deletions
|
@ -35,6 +35,7 @@ class BotServerTestCase(TestCase):
|
|||
server.app.config["BOT_HANDLERS"] = bot_handlers
|
||||
server.app.config["MESSAGE_HANDLERS"] = message_handlers
|
||||
|
||||
mock_ExternalBotHandler.return_value.full_name = "test"
|
||||
response = self.app.post(data=json.dumps(event))
|
||||
|
||||
# NOTE: Currently, assert_bot_server_response can only check the expected_response
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue