#NEWLINE# def test_delete_buildings_owner( self ) : #NEWLINE# #INDENT# 'tests delete_buildings for owner role' #NEWLINE# self . _set_role_level ( ROLE_OWNER ) #NEWLINE# self . assertEqual ( BuildingSnapshot . objects . filter ( canonicalbuilding__active = True ) . count ( ) , self . NUMBER_ACTIVE ) #NEWLINE# resp = self . client . delete ( reverse_lazy ( 'seed:delete_buildings' ) , data = json . dumps ( { #NEWLINE# #INDENT# 'organization_id' : resp . org . id , #NEWLINE# 'search_payload' : { #NEWLINE# #INDENT# 'select_all_checkbox' : True , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } ) , content_type = 'application/json' ) #NEWLINE# self . assertDictEqual ( json . loads ( resp . content ) , { #NEWLINE# #INDENT# 'status' : 'success' , #NEWLINE# #UNINDENT# } ) #NEWLINE# self . assertEqual ( BuildingSnapshot . objects . filter ( canonicalbuilding__active = True ) . count ( ) , 0 )