trello: Use client_head wrapper in tests.

This commit is contained in:
Tim Abbott 2017-08-25 16:24:50 -07:00
parent f51f89a86e
commit 27101ae931
2 changed files with 9 additions and 1 deletions

View File

@ -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

View File

@ -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):