mirror of
https://github.com/zulip/zulip.git
synced 2025-11-06 15:03:34 +00:00
Change get_bots API to use rest_dispatch
(imported from commit 921895dd636ba118a0f57e60a7bcb9dca1c7c605)
This commit is contained in:
@@ -334,7 +334,7 @@ class ActivateTest(AuthedTestCase):
|
||||
|
||||
class BotTest(AuthedTestCase):
|
||||
def assert_num_bots_equal(self, count):
|
||||
result = self.client.post("/json/get_bots")
|
||||
result = self.client.get("/json/bots")
|
||||
self.assert_json_success(result)
|
||||
json = ujson.loads(result.content)
|
||||
self.assertEqual(count, len(json['bots']))
|
||||
@@ -417,7 +417,7 @@ class BotTest(AuthedTestCase):
|
||||
self.assert_json_error(result, 'Insufficient permission')
|
||||
|
||||
def get_bot(self):
|
||||
result = self.client.post("/json/get_bots")
|
||||
result = self.client.get("/json/bots")
|
||||
bots = ujson.loads(result.content)['bots']
|
||||
return bots[0]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user