Module Assign NameStore Str Import alias Import alias ClassDef bases NameLoad body Pass decorator_list ClassDef bases NameLoad body Pass decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad body Assign AttributeStore NameLoad attr NameLoad If Call NameLoad NameLoad TupleLoad NameLoad NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list decorator_list ClassDef bases AttributeLoad AttributeLoad NameLoad attr attr body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad body If BoolOpAnd NameLoad Call NameLoad NameLoad Str body Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr orelse Assign AttributeStore NameLoad attr NameLoad If CompareIsNot NameLoad NameLoad body Assign AttributeStore NameLoad attr Call NameLoad NameLoad orelse Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr BoolOpOr NameLoad Dict decorator_list FunctionDef arguments args NameParam defaults body Return AttributeLoad NameLoad attr decorator_list decorator_list ClassDef bases AttributeLoad AttributeLoad NameLoad attr attr body FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad body Expr Str Assign AttributeStore NameLoad attr BoolOpOr NameLoad ListLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr BoolOpOr NameLoad Dict decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Str Assign NameStore Call NameLoad NameLoad NameLoad keyword NameLoad keyword NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Str If CompareIs AttributeLoad NameLoad attr NameLoad body If Call NameLoad NameLoad TupleLoad NameLoad NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad For NameStore AttributeLoad NameLoad attr body If BoolOpAnd CompareEq AttributeLoad SubscriptLoad NameLoad Index Num attr NameLoad CompareEq AttributeLoad SubscriptLoad NameLoad Index Num attr NameLoad body Return SubscriptLoad NameLoad Index Num Raise Call NameLoad BinOpMod Str TupleLoad NameLoad NameLoad orelse Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad keyword NameLoad keyword NameLoad Assign NameStore Call NameLoad keyword NameLoad keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad keyword NameLoad keyword NameLoad Return NameLoad decorator_list decorator_list
N/A N/A __author__ api.jscudder (Jeff Scudder) N/A atom.http_interface N/A atom.url Error N/A Exception N/A N/A N/A NoRecordingFound N/A Error N/A N/A N/A MockRequest N/A object N/A N/A Holds parameters of an HTTP request for matching against future requests.
   __init__ N/A N/A self operation url data headers N/A None None N/A N/A N/A self operation operation N/A N/A isinstance url N/A str unicode N/A N/A url N/A N/A N/A atom url parse_url url N/A N/A self url url N/A N/A self data data N/A N/A self headers headers N/A N/A MockResponse N/A N/A N/A atom http_interface HttpResponse N/A N/A Simulates an httplib.HTTPResponse object. __init__ N/A N/A self body status reason headers N/A None None None None N/A N/A N/A body N/A hasattr body read N/A N/A N/A self body N/A N/A body read N/A N/A N/A self body body N/A N/A status None N/A N/A N/A self status N/A int status N/A N/A N/A self status None N/A N/A self reason reason N/A N/A self _headers N/A headers N/A N/A read N/A N/A self N/A N/A N/A N/A self body N/A N/A MockHttpClient N/A N/A N/A atom http_interface GenericHttpClient N/A __init__ N/A N/A self headers recordings real_client N/A None None None N/A N/A An HttpClient which responds to request with stored data.

    The request-response pairs are stored as tuples in a member list named
    recordings.

    The MockHttpClient can be switched from replay mode to record mode by
    setting the real_client member to an instance of an HttpClient which will
    make real HTTP requests and store the server's response in list of 
    recordings.
    
    Args:
      headers: dict containing HTTP headers which should be included in all
          HTTP requests.
      recordings: The initial recordings to be used for responses. This list
          contains tuples in the form: (MockRequest, MockResponse)
      real_client: An HttpClient which will make a real HTTP request. The 
          response will be converted into a MockResponse and stored in 
          recordings.
     N/A N/A self recordings N/A recordings N/A N/A N/A self real_client real_client N/A N/A self headers N/A headers N/A N/A add_response N/A N/A self response operation url data headers N/A None None N/A N/A Adds a request-response pair to the recordings list.
    
    After the recording is added, future matching requests will receive the
    response.
    
    Args:
      response: MockResponse
      operation: str
      url: str
      data: str, Currently the data is ignored when looking for matching
          requests.
      headers: dict of strings: Currently the headers are ignored when
          looking for matching requests.
     N/A request N/A MockRequest operation url data data headers headers N/A N/A N/A N/A self recordings append N/A request response N/A request N/A N/A self operation url data headers N/A None None N/A N/A Returns a matching MockResponse from the recordings.
    
    If the real_client is set, the request will be passed along and the 
    server's response will be added to the recordings and also returned. 

    If there is no match, a NoRecordingFound error will be raised.
     N/A N/A N/A self real_client None N/A N/A N/A isinstance url N/A str unicode N/A N/A url N/A N/A N/A atom url parse_url url N/A recording N/A self recordings N/A N/A N/A N/A N/A N/A recording N/A 0 operation operation N/A N/A N/A recording N/A 0 url url N/A N/A N/A recording N/A 1 N/A N/A NoRecordingFound N/A No recodings found for %s %s N/A operation url N/A N/A response N/A N/A N/A self real_client request operation url data data headers headers N/A stored_response N/A MockResponse body response status N/A response status reason N/A response reason N/A N/A N/A self add_response stored_response operation url data data headers headers N/A stored_response N/A N/A