mirror of https://github.com/zulip/zulip.git
trello: Use client_head wrapper in tests.
This commit is contained in:
parent
f51f89a86e
commit
27101ae931
|
@ -175,6 +175,14 @@ class ZulipTestCase(TestCase):
|
|||
self.set_http_host(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
|
||||
def client_post(self, url, info={}, **kwargs):
|
||||
# type: (Text, Dict[str, Any], **Any) -> HttpResponse
|
||||
|
|
|
@ -9,7 +9,7 @@ class TrelloHookTests(WebhookTestCase):
|
|||
|
||||
def test_trello_confirmation_request(self):
|
||||
# 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)
|
||||
|
||||
def test_trello_webhook_when_card_was_moved_to_another_list(self):
|
||||
|
|
Loading…
Reference in New Issue