#NEWLINE# def test_merge_without_overlap( self ) : #NEWLINE# #INDENT# '\n        Tests that calling merge_to() when no merge is required acts as a move.\n        ' #NEWLINE# models . Topic . objects . get_or_create_by_full_name ( 'c/b/d/e' ) #NEWLINE# target = models . Topic . objects . get_by_full_name ( 'a' ) #NEWLINE# node = models . Topic . objects . get_by_full_name ( 'c/b/d' ) #NEWLINE# signals . pre_merge . connect ( self . signal_catcher ) #NEWLINE# signals . pre_move . connect ( self . signal_catcher ) #NEWLINE# node . merge_to ( target ) #NEWLINE# signals . pre_merge . disconnect ( self . signal_catcher ) #NEWLINE# self . assertEqual ( len ( self . signals ) , 1 ) #NEWLINE# signal_dict = self . signals [ 0 ] [ 1 ] #NEWLINE# self . assertEqual ( signal_dict [ 'signal' ] , signals . pre_move ) #NEWLINE# self . assertEqual ( signal_dict [ 'moving' ] [ 0 ] [ 0 ] . id , node . id ) #NEWLINE# self . assertEqual ( signal_dict [ 'moving' ] [ 0 ] [ 1 ] . id , target . id ) #NEWLINE# try : #NEWLINE# #INDENT# models . Topic . objects . get_by_full_name ( 'a/d' ) #NEWLINE# #UNINDENT# except models . Topic . DoesNotExist : #NEWLINE# #INDENT# self . fail ( "Node wasn't moved to correct location." ) #NEWLINE# #UNINDENT# self . assertRaises ( models . Topic . DoesNotExist , models . Topic . objects . get_by_full_name , 'c/b/d' ) #NEWLINE# self . assertRaises ( models . Topic . DoesNotExist , models . Topic . objects . get_by_full_name , 'c/b/d/e' )