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)
评论列表
文章目录