#NEWLINE# def test_pivoted( self , models ) : #NEWLINE# #INDENT# models . child1 . appendTo ( self . parent ) #NEWLINE# assert ( list ( models . parent . children ) == [ models . child1 ] ) #NEWLINE# models . child2 . prependTo ( models . parent ) #NEWLINE# assert ( list ( models . parent . children ) == [ models . child2 , models . child1 ] ) #NEWLINE# models . child1 . insertBefore ( models . child2 ) #NEWLINE# assert ( list ( models . parent . children ) == [ models . child1 , models . child2 ] ) #NEWLINE# models . child1 . insertAfter ( models . child2 ) #NEWLINE# assert ( list ( models . parent . children ) == [ models . child2 , models . child1 ] )