Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
wordpress: Fix nonsense tests.
Anders Kaseorg3321a81c4aad
diff --git a/zerver/webhooks/wordpress/tests.py b/zerver/webhooks/wordpress/tests.pyindex 18702e1f070..ffea8b3e963 100644--- a/zerver/webhooks/wordpress/tests.py+++ b/zerver/webhooks/wordpress/tests.py@@ -92,11 +92,11 @@ class WordPressHookTests(WebhookTestCase):self.subscribe(self.test_user, self.STREAM_NAME)# post to the webhook url- post_params = {- "stream_name": self.STREAM_NAME,- "content_type": "application/x-www-form-urlencoded",- }- result = self.client_post(self.url, "unknown_action", **post_params)+ result = self.client_post(+ self.url,+ self.get_body("unknown_action_no_data"),+ content_type="application/x-www-form-urlencoded",+ )# check that we got the expected error messageself.assert_json_error(result, "Unknown WordPress webhook action: WordPress action")@@ -107,11 +107,11 @@ class WordPressHookTests(WebhookTestCase):# params but without the hook parameter. This should also return an error.self.subscribe(self.test_user, self.STREAM_NAME)- post_params = {- "stream_name": self.STREAM_NAME,- "content_type": "application/x-www-form-urlencoded",- }- result = self.client_post(self.url, "unknown_action", **post_params)+ result = self.client_post(+ self.url,+ self.get_body("unknown_action_no_hook_provided"),+ content_type="application/x-www-form-urlencoded",+ )self.assert_json_error(result, "Unknown WordPress webhook action: WordPress action")