#NEWLINE# @ test . idempotent_id ( 'a9b39f46-a350-11e5-97c7-54ee756c66df' ) #NEWLINE# def test_network_presence_prevents_policy_rbac_policy_deletion( self ) : #NEWLINE# #INDENT# res = self . _make_admin_policy_shared_to_tenant_id ( self . client2 . tenant_id ) #NEWLINE# qos_policy_id = res [ 'policy' ] [ 'id' ] #NEWLINE# self . _create_network ( qos_policy_id , self . client2 ) #NEWLINE# with testtools . ExpectedException ( exceptions . Conflict ) : #NEWLINE# #INDENT# self . admin_client . delete_rbac_policy ( res [ 'rbac_policy' ] [ 'id' ] ) #NEWLINE# #UNINDENT# wild = self . admin_client . create_rbac_policy ( object_type = 'qos_policy' , object_id = res [ 'policy' ] [ 'id' ] , action = 'access_as_shared' , target_tenant = '*' ) [ 'rbac_policy' ] #NEWLINE# self . admin_client . delete_rbac_policy ( res [ 'rbac_policy' ] [ 'id' ] ) #NEWLINE# with testtools . ExpectedException ( exceptions . Conflict ) : #NEWLINE# #INDENT# self . admin_client . delete_rbac_policy ( wild [ 'id' ] ) #NEWLINE# #UNINDENT# with testtools . ExpectedException ( exceptions . Conflict ) : #NEWLINE# #INDENT# self . admin_client . update_rbac_policy ( wild [ 'id' ] , target_tenant = self . client2 . tenant_id )