#NEWLINE# def test_cant_create_child_product_for_invalid_parents( self ) : #NEWLINE# #INDENT# invalid_parent = create_product ( partner_users = [ self . user ] ) #NEWLINE# self . assertFalse ( invalid_parent . can_be_parent ( ) ) #NEWLINE# url = reverse ( 'dashboard:catalogue-product-create-child' , kwargs = { #NEWLINE# #INDENT# 'parent_pk' : invalid_parent . pk , #NEWLINE# #UNINDENT# } ) #NEWLINE# self . assertRedirects ( self . get ( url ) , reverse ( 'dashboard:catalogue-product-list' ) )