#NEWLINE# def test_delete_buildings_deselected_buildings( self ) : #NEWLINE# #INDENT# 'tests delete_buildings for de-selected_buildings' #NEWLINE# self . _set_role_level ( ROLE_MEMBER ) #NEWLINE# self . assertEqual ( BuildingSnapshot . objects . filter ( canonicalbuilding__active = True ) . count ( ) , self . NUMBER_ACTIVE ) #NEWLINE# ids = BuildingSnapshot . objects . filter ( canonicalbuilding__active = True ) . values_list ( 'pk' , flat = True ) [ : 10 ] #NEWLINE# resp = self . client . delete ( reverse_lazy ( 'seed:delete_buildings' ) , data = json . dumps ( { #NEWLINE# #INDENT# 'organization_id' : self . org . id , #NEWLINE# 'search_payload' : { #NEWLINE# #INDENT# 'select_all_checkbox' : True , #NEWLINE# 'selected_buildings' : list ( resp ) , #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 ( ) , 10 ) #NEWLINE# self . assertEqual ( BuildingSnapshot . objects . filter ( canonicalbuilding__active = True , pk__in = list ( ids ) ) . count ( ) , 10 )