#NEWLINE# @ test . idempotent_id ( '24153230-84a9-4dd5-9525-bad6d2343c75' ) #NEWLINE# def test_delete_not_allowed_if_policy_in_use_by_port( self ) : #NEWLINE# #INDENT# policy = self . create_qos_policy ( name = 'test-policy' , description = 'test policy' , shared = True ) #NEWLINE# network = self . create_shared_network ( 'test network' ) #NEWLINE# port = self . create_port ( network , qos_policy_id = policy [ 'id' ] ) #NEWLINE# self . assertRaises ( exceptions . Conflict , self . admin_client . delete_qos_policy , policy [ 'id' ] ) #NEWLINE# self . _disassociate_port ( port [ 'id' ] ) #NEWLINE# self . admin_client . delete_qos_policy ( policy [ 'id' ] )