示例#1
0
    def request(self, method="GET", response="Test Response", status_code=200, url=None, **kwargs):
        if not url:
            url = self.url

        self.requests.register_uri(method, url, text=response, status_code=status_code)

        return httpclient.request(url, method, **kwargs)
    def request(self, method='GET', response='Test Response', status=200,
                url=None, **kwargs):
        if not url:
            url = self.url

        httpretty.register_uri(method, url, body=response, status=status)

        return httpclient.request(url, method, **kwargs)
示例#3
0
    def request(self, method='GET', response='Test Response', status=200,
                url=None, **kwargs):
        if not url:
            url = self.url

        httpretty.register_uri(method, url, body=response, status=status)

        return httpclient.request(url, method, debug=True,
                                  logger=self.logger, **kwargs)
    def request(self, method='GET', response='Test Response', status_code=200,
                url=None, **kwargs):
        if not url:
            url = self.url

        self.requests_mock.register_uri(method, url, text=response,
                                        status_code=status_code)

        with self.deprecations.expect_deprecations_here():
            return httpclient.request(url, method, **kwargs)
    def request(self, method='GET', response='Test Response', status_code=200,
                url=None, headers={}, **kwargs):
        if not url:
            url = self.url

        self.requests_mock.register_uri(method, url, text=response,
                                        status_code=status_code,
                                        headers=headers)

        with self.deprecations.expect_deprecations_here():
            return httpclient.request(url, method, headers=headers, **kwargs)
    def request(self,
                method='GET',
                response='Test Response',
                status_code=200,
                url=None,
                **kwargs):
        if not url:
            url = self.url

        self.requests.register_uri(method,
                                   url,
                                   text=response,
                                   status_code=status_code)

        return httpclient.request(url, method, **kwargs)