#NEWLINE# def test_can_delete_a_parent_product( self ) : #NEWLINE# #INDENT# parent_product = create_product ( structure = 'parent' ) #NEWLINE# create_product ( parent = parent_product ) #NEWLINE# url = reverse ( 'dashboard:catalogue-product-delete' , args = ( parent_product . id , ) ) #NEWLINE# page = self . get ( url ) . form . submit ( ) #NEWLINE# self . assertRedirects ( page , reverse ( 'dashboard:catalogue-product-list' ) ) #NEWLINE# self . assertEqual ( Product . objects . count ( ) , 0 )