def head(self, url, **kwargs): """ @param (string) url - The URL to emulate a HEAD request to @returns (paste.fixture.TestResponse) """ if not kwargs.get('headers'): kwargs['headers'] = {'Authorization': util.make_credentials()} return self._do_request(url, 'HEAD', **kwargs)
def put_json(self, url, **kwargs): """ @param (string) url - The URL to emulate a PUT request to @returns (paste.fixture.TestResponse) """ # support automatic, correct authentication if not specified otherwise if not kwargs.get('headers'): kwargs['headers'] = {'Authorization': util.make_credentials()} return self._do_request(url, 'PUTJ', **kwargs)