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)
评论列表
文章目录