urls: Remove the old POST endpoint for alert words.

This commit is contained in:
Alena Volkova
2017-09-25 17:41:41 -04:00
committed by Tim Abbott
parent b17fecbf06
commit ca687e01d7
3 changed files with 2 additions and 24 deletions

View File

@@ -39,7 +39,7 @@ class AlertWordTests(ZulipTestCase):
params = {
'alert_words': ujson.dumps(['milk', 'cookies'])
}
result = self.client_post('/json/users/me/alert_words', params)
result = self.client_put('/json/users/me/alert_words', params)
self.assert_json_success(result)
user = self.example_user(user_name)
words = user_alert_words(user)
@@ -140,20 +140,6 @@ class AlertWordTests(ZulipTestCase):
self.assert_json_success(result)
self.assertEqual(result.json()['alert_words'], ['two', 'three'])
def test_json_list_set(self):
# type: () -> None
self.login(self.example_email("hamlet"))
result = self.client_put('/json/users/me/alert_words', {'alert_words': ujson.dumps(['one', 'two', 'three'])})
self.assert_json_success(result)
result = self.client_post('/json/users/me/alert_words', {'alert_words': ujson.dumps(['a', 'b', 'c'])})
self.assert_json_success(result)
result = self.client_get('/json/users/me/alert_words')
self.assert_json_success(result)
self.assertEqual(result.json()['alert_words'], ['a', 'b', 'c'])
def message_does_alert(self, user_profile, message):
# type: (UserProfile, Text) -> bool
"""Send a bunch of messages as othello, so Hamlet is notified"""