mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 13:03:29 +00:00
urls: Remove the old POST endpoint for alert words.
This commit is contained in:
committed by
Tim Abbott
parent
b17fecbf06
commit
ca687e01d7
@@ -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"""
|
||||
|
||||
Reference in New Issue
Block a user