Exemple #1
0
 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)
Exemple #2
0
 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)
Exemple #3
0
 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)
Exemple #4
0
 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)