test_oauth.py 文件源码

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

项目:weibopy 作者: nooperpudd 项目源码 文件源码
def test_get_token_info(self):
        """
        :return:
        """
        body = """
          {
           "uid": 1073880650,
           "appkey": 1352222456,
           "scope": null,
           "create_at": 1352267591,
           "expire_in": 157679471
         }
        """

        httpretty.register_uri(
            httpretty.POST, "https://api.weibo.com/oauth2/get_token_info",
            body=body,
            status=200,
            content_type='text/json'
        )

        response = self.oauth2_client.get_token_info(self.access_token)

        self.assertDictEqual(response, json.loads(body))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号