Change get_bots API to use rest_dispatch

(imported from commit 921895dd636ba118a0f57e60a7bcb9dca1c7c605)
This commit is contained in:
Jason Michalski
2014-02-11 10:31:22 -05:00
parent 7822be5cd9
commit 9d973ff106
5 changed files with 8 additions and 8 deletions

View File

@@ -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]