src/schemathesis/models.py
def as_requests_kwargs(self, base_url: Optional[str] = None) -> Dict[str, Any]:
        """Convert the case into a dictionary acceptable by requests."""
        base_url = self._get_base_url(base_url)
        formatted_path = self.formatted_path.lstrip("/")  # pragma: no mutate
        url = urljoin(base_url + "/", formatted_path)
        # Form data and body are mutually exclusive
        extra: Dict[str, Optional[Dict]]
        if self.form_data:
            extra = {"files": self.form_data}
        else:
            extra = {"json": self.body}
        return {
            "method": self.method,
            "url": url,
            "cookies": self.cookies,
            "headers": self.headers,
            "params": self.query,
            **extra,
        }
Convert the case into a dictionary acceptable by requests.
Convert the case into a dictionary acceptable by requests.
Convert the case into a dictionary acceptable by requests .
def as_requests_kwargs(self, base_url: Optional[str] = None) -> Dict[str, Any]:
        base_url = self._get_base_url(base_url)
        formatted_path = self.formatted_path.lstrip("/")  
        url = urljoin(base_url + "/", formatted_path)
        extra: Dict[str, Optional[Dict]]
        if self.form_data:
            extra = {"files": self.form_data}
        else:
            extra = {"json": self.body}
        return {
            "method": self.method,
            "url": url,
            "cookies": self.cookies,
            "headers": self.headers,
            "params": self.query,
            **extra,
        }
def as_requests_kwargs ( self , base_url : Optional [ str ] = None ) -> Dict [ str , Any ] : base_url = self . _get_base_url ( base_url ) formatted_path = self . formatted_path . lstrip ( "/" ) url = urljoin ( base_url + "/" , formatted_path ) extra : Dict [ str , Optional [ Dict ] ] if self . form_data : extra = { "files" : self . form_data } else : extra = { "json" : self . body } return { "method" : self . method , "url" : url , "cookies" : self . cookies , "headers" : self . headers , "params" : self . query , ** extra , }
Convert the case into a dictionary acceptable by requests.
Convert the case into a dictionary acceptable by requests .
"""Convert the case into a dictionary acceptable by requests.""" # pragma: no mutate # Form data and body are mutually exclusive
self
base_url
Optional[str]