#NEWLINE# def test_deletion( site ) : #NEWLINE# #INDENT# attribute = models . Attribute . objects . create ( resource_name = 'Network' , site = site , name = 'test_attribute' ) #NEWLINE# network = models . Network . objects . create ( cidr = '10.0.0.0/8' , site = site , attributes = { #NEWLINE# #INDENT# 'test_attribute' : 'foo' , #NEWLINE# #UNINDENT# } ) #NEWLINE# with pytest . raises ( ProtectedError ) : #NEWLINE# #INDENT# attribute . delete ( ) #NEWLINE# #UNINDENT# network . delete ( ) #NEWLINE# attribute . delete ( )