test_subvoat.py 文件源码

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

项目:voat 作者: Cightline 项目源码 文件源码
def test_posting_comment():
    api_token = get_api_token()
    body  = ''.join(random.choices(string.ascii_letters, k=100))

    data = requests.post('%s/get_threads' % (base_address), {'subvoat_name':'test_exists'}).json()

    thread_uuid = data['result'][0]['uuid']

    print(requests.post('%s/submit_comment' % (base_address), {'thread_uuid':thread_uuid, 
                                                              'username':'test_username', 
                                                              'api_token':api_token,
                                                              'body':body}).text)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号