def generate_threads(self, count):
api_token = self.get_api_token()
for x in range(count):
title = ''.join(random.choices(string.ascii_letters, k=10))
body = ''.join(random.choices(string.ascii_letters, k=100))
result = requests.post('%s/submit_thread' % (self.base_address), {'username':'test_username',
'api_token':api_token,
'subvoat_name':'test_exists',
'title':title,
'body':body}).json()
评论列表
文章目录