test_create.py 文件源码

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

项目:ckanext-powerview 作者: OCHA-DAP 项目源码 文件源码
def test_powerview_create_resource_id_list_creates_associations(self):
        '''If resource id list is provided, associations are create with
        powerview.'''
        sysadmin = Sysadmin()
        r1 = Resource()
        r2 = Resource()
        r3 = Resource()

        create_dict = self._make_create_data_dict()
        create_dict['resources'] = [r1['id'], r2['id'], r3['id']]

        toolkit.get_action('powerview_create')(
            context={'user': sysadmin['name']},
            data_dict=create_dict
        )

        nosetools.assert_equal(PowerviewResourceAssociation.count(), 3)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号