zulip_botserver: Eliminate the bots_config global variable.

It's easy to just pass it around to the one function that needs it.
This commit is contained in:
Tim Abbott 2018-05-15 12:27:55 -07:00
parent 1e5c0fec1f
commit 5ef224f2a2
2 changed files with 10 additions and 8 deletions

View file

@ -21,9 +21,8 @@ class BotServerTestCase(TestCase):
) -> None:
if available_bots is not None:
server.available_bots = available_bots
server.bots_config = bots_config # type: ignore # monkey-patching
server.load_lib_modules()
server.load_bot_handlers()
server.load_bot_handlers(bots_config)
response = self.app.post(payload_url, data=json.dumps(message))