http.py 文件源码

python
阅读 25 收藏 0 点赞 0 评论 0

项目:GAMADV-X 作者: taers232c 项目源码 文件源码
def __init__(self, resp, content, postproc):
    """Constructor for HttpRequestMock

    Args:
      resp: httplib2.Response, the response to emulate coming from the request
      content: string, the response body
      postproc: callable, the post processing function usually supplied by
                the model class. See model.JsonModel.response() as an example.
    """
    self.resp = resp
    self.content = content
    self.postproc = postproc
    if resp is None:
      self.resp = httplib2.Response({'status': 200, 'reason': 'OK'})
    if 'reason' in self.resp:
      self.resp.reason = self.resp['reason']
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号