def create_test_subvoat(self, count=0):
api_token = self.get_api_token()
for x in range(count):
body = ''.join(random.choices(string.ascii_letters, k=100))
title = ''.join(random.choices(string.ascii_letters, k=10))
result = requests.post('%s/create_subvoat' % (self.base_address), {'subvoat_name':'test_%s' % (title[0:5]),
'username':'test_username',
'api_token':api_token,
'body':body,
'title':title})
self.check(result)
#return result.json()['result']
# test subvoat.
# try to create thread without subvoat.
# try to create subvoat that already exists
# try to create subvoat with name length out of parameters (see config.json)
# try to create subvoat with incorrect api_token
# try to create subvoat with fake user
评论列表
文章目录