Use POST, not PATCH, for patching bots.

This is a temporary expedient measure to work around our
PATCH not supporting file uploads in our current Django setup.

(imported from commit c3146b23d5d7d134c2b80507eb87033ca375a4db)
This commit is contained in:
Steve Howell
2013-07-31 10:09:30 -04:00
parent 7803cadd66
commit ab23c534b9
4 changed files with 6 additions and 6 deletions

View File

@@ -590,7 +590,7 @@ class BotTest(AuthedTestCase):
bot_info = {
'full_name': 'Fred',
}
result = self.client_patch("/json/bots/hambot-bot@zulip.com", bot_info)
result = self.client.post("/json/bots/hambot-bot@zulip.com", bot_info)
self.assert_json_error(result, 'Insufficient permission')
def get_bot(self):
@@ -621,7 +621,7 @@ class BotTest(AuthedTestCase):
bot_info = {
'full_name': 'Fred',
}
result = self.client_patch("/json/bots/hambot-bot@zulip.com", bot_info)
result = self.client.post("/json/bots/hambot-bot@zulip.com", bot_info)
self.assert_json_success(result)
full_name = ujson.loads(result.content)['full_name']
@@ -637,7 +637,7 @@ class BotTest(AuthedTestCase):
bot_info = {
'full_name': 'Fred',
}
result = self.client_patch("/json/bots/nonexistent-bot@zulip.com", bot_info)
result = self.client.post("/json/bots/nonexistent-bot@zulip.com", bot_info)
self.assert_json_error(result, 'No such user')
self.assert_num_bots_equal(1)