def stub_out_http_backend(stubs):
 class FakeHTTPConnection(object, ):
  def __init__(self, *args, **kwargs):
   pass
  def getresponse(self):
   if len(FAKE_RESPONSE_STACK):
    return FAKE_RESPONSE_STACK.pop()
   return utils.FakeHTTPResponse()
  def request(self, *_args, **_kwargs):
   pass
  def close(self):
   pass
 def fake_get_conn_class(self, *args, **kwargs):
  return FakeHTTPConnection
 stubs.Set(Store, '_get_conn_class', fake_get_conn_class)

def stub_out_http_backend ( stubs ) : class FakeHTTPConnection ( object , ) : def __init__ ( self , * args , ** kwargs ) : pass def getresponse ( self ) : if len ( FAKE_RESPONSE_STACK ) : return FAKE_RESPONSE_STACK . pop ( ) return utils . FakeHTTPResponse ( ) def request ( self , * _args , ** _kwargs ) : pass def close ( self ) : pass def fake_get_conn_class ( self , * args , ** kwargs ) : return FakeHTTPConnection stubs . Set ( Store , '_get_conn_class' , fake_get_conn_class )
stubs out the httplib .