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