LB Web Services Testing API  LB 4.x
lb.web.service Namespace Reference

Functions

def create_http_error (path, code, content=None, headers=None)
 Creates an HttpError object based on the error code. More...
 

Function Documentation

def lb.web.service.create_http_error (   path,
  code,
  content = None,
  headers = None 
)

Creates an HttpError object based on the error code.

For error code >= 500 it creates a HttpServerError. For error codes between 400 and 499, creates an HttpClientError.

Parameters
pathThe url path for the failed request.
codeThe http error code.
contentThe error content.
headersHeaders set in the request.
Returns
An HttpError object

Definition at line 151 of file service.py.