api: Fetch server_settings when initializing Client.
We store the information about the version of the server and the feature level for transparent compatibility handling.
This commit is contained in:
parent
4e5e7b3d0f
commit
05b9850ba3
2 changed files with 12 additions and 0 deletions
|
@ -25,6 +25,13 @@ class BotServerTests(BotServerTestCase):
|
|||
def handler_class(self) -> Any:
|
||||
return BotServerTests.MockMessageHandler()
|
||||
|
||||
def setUp(self) -> None:
|
||||
# Since initializing Client invokes `get_server_settings` that fails in the test
|
||||
# environment, we need to mock it to pretend that there exists a backend.
|
||||
super().setUp()
|
||||
self.patch = mock.patch("zulip.Client.get_server_settings", return_value=mock.Mock())
|
||||
self.patch.start()
|
||||
|
||||
def test_successful_request(self) -> None:
|
||||
available_bots = ["helloworld"]
|
||||
bots_config = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue