performance_test.py 文件源码

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

项目:voat 作者: Cightline 项目源码 文件源码
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()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号