test_ajax_get_infos.py 文件源码

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

项目:dbas 作者: hhucn 项目源码 文件源码
def test_get_public_user_data(self):
        self.config.testing_securitypolicy(userid='Tobias', permissive=True)
        # more tests for get_public_user_data are in test_handler_opinion
        from dbas.views import get_public_user_data as ajax
        request = testing.DummyRequest(params={
            'lang': 'en',
            'uids': json.dumps([2, 3]),
            'is_argument': 'true',
            'is_attitude': 'true',
            'is_reaction': 'true',
            'is_position': 'true',
            'is_supporti': 'true',
        }, matchdict={})
        response = ajax(request)
        self.assertIsNotNone(response)
        self.assertTrue(len(response['error']) != 0)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号