#NEWLINE# def testMovePlugWithInputConnection( self ) : #NEWLINE# #INDENT# script = Gaffer . ScriptNode ( ) #NEWLINE# script [ 'n1' ] = Gaffer . Node ( ) #NEWLINE# script [ 'n1' ] [ 'p' ] = Gaffer . Plug ( ) #NEWLINE# script [ 'n2' ] = Gaffer . Node ( ) #NEWLINE# script [ 'n2' ] [ 'p' ] = Gaffer . Plug ( ) #NEWLINE# script [ 'n2' ] [ 'p' ] . setInput ( script [ 'n1' ] [ 'p' ] ) #NEWLINE# g = GafferUI . GraphGadget ( script ) #NEWLINE# script [ 'n3' ] = Gaffer . Node ( ) #NEWLINE# script [ 'n3' ] [ 'p' ] = script [ 'n2' ] [ 'p' ] #NEWLINE# connection = g . connectionGadget ( script [ 'n3' ] [ 'p' ] ) #NEWLINE# dstNodule = connection . dstNodule ( ) #NEWLINE# srcNodule = connection . srcNodule ( ) #NEWLINE# self . assertTrue ( dstNodule . plug ( ) . isSame ( script [ 'n3' ] [ 'p' ] ) ) #NEWLINE# self . assertTrue ( srcNodule . plug ( ) . isSame ( script [ 'n1' ] [ 'p' ] ) ) #NEWLINE# self . assertTrue ( g . nodeGadget ( script [ 'n1' ] ) . isAncestorOf ( srcNodule ) ) #NEWLINE# self . assertTrue ( g . nodeGadget ( script [ 'n3' ] ) . isAncestorOf ( dstNodule ) )