test_integrations.py 文件源码

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

项目:optimove 作者: nicolasramy 项目源码 文件源码
def test_add_channel_apps_overflow(self):
        responses.add_callback(
            responses.POST,
            'https://api.optimove.net/v3.0/general/login',
            callback=login_callback,
            content_type='application/json'
        )

        responses.add_callback(
            responses.POST,
            'https://api.optimove.net/v3.0/integrations/AddChannelApps',
            callback=add_channel_apps_callback,
            content_type='application/json'
        )

        client = Client('username', 'password')
        too_much_channel_apps = {}
        for app_id in range(150):
            too_much_channel_apps[app_id] = \
                ''.join([random.choice(string.ascii_uppercase + string.digits + ' ') for _ in range(50)])

        self.assertRaises(Exception, client.integrations.add_channel_apps, 3, too_much_channel_apps)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号