mirror of
https://github.com/zulip/zulip.git
synced 2025-11-16 03:41:58 +00:00
trello: Use client_head wrapper in tests.
This commit is contained in:
@@ -175,6 +175,14 @@ class ZulipTestCase(TestCase):
|
|||||||
self.set_http_host(kwargs)
|
self.set_http_host(kwargs)
|
||||||
return django_client.options(url, encoded, **kwargs)
|
return django_client.options(url, encoded, **kwargs)
|
||||||
|
|
||||||
|
@instrument_url
|
||||||
|
def client_head(self, url, info={}, **kwargs):
|
||||||
|
# type: (Text, Dict[str, Any], **Any) -> HttpResponse
|
||||||
|
encoded = urllib.parse.urlencode(info)
|
||||||
|
django_client = self.client # see WRAPPER_COMMENT
|
||||||
|
self.set_http_host(kwargs)
|
||||||
|
return django_client.head(url, encoded, **kwargs)
|
||||||
|
|
||||||
@instrument_url
|
@instrument_url
|
||||||
def client_post(self, url, info={}, **kwargs):
|
def client_post(self, url, info={}, **kwargs):
|
||||||
# type: (Text, Dict[str, Any], **Any) -> HttpResponse
|
# type: (Text, Dict[str, Any], **Any) -> HttpResponse
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ class TrelloHookTests(WebhookTestCase):
|
|||||||
|
|
||||||
def test_trello_confirmation_request(self):
|
def test_trello_confirmation_request(self):
|
||||||
# type: () -> None
|
# type: () -> None
|
||||||
response = self.client.head(self.build_webhook_url())
|
response = self.client_head(self.build_webhook_url())
|
||||||
self.assertEqual(response.status_code, 200, response)
|
self.assertEqual(response.status_code, 200, response)
|
||||||
|
|
||||||
def test_trello_webhook_when_card_was_moved_to_another_list(self):
|
def test_trello_webhook_when_card_was_moved_to_another_list(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user