#NEWLINE# def test_multiple_m2m( self ) : #NEWLINE# #INDENT# s1 = SelfRefer . objects . create ( name = 's1' ) #NEWLINE# s2 = SelfRefer . objects . create ( name = 's2' ) #NEWLINE# s3 = SelfRefer . objects . create ( name = 's3' ) #NEWLINE# s1 . references . add ( s2 ) #NEWLINE# s1 . related . add ( s3 ) #NEWLINE# e1 = Entry . objects . create ( name = 'e1' ) #NEWLINE# t1 = Tag . objects . create ( name = 't1' ) #NEWLINE# t2 = Tag . objects . create ( name = 't2' ) #NEWLINE# e1 . topics . add ( t1 ) #NEWLINE# e1 . related . add ( t2 ) #NEWLINE# self . assertQuerysetEqual ( s1 . references . all ( ) , [ '<SelfRefer: s2>' ] ) #NEWLINE# self . assertQuerysetEqual ( s1 . related . all ( ) , [ '<SelfRefer: s3>' ] ) #NEWLINE# self . assertQuerysetEqual ( e1 . topics . all ( ) , [ '<Tag: t1>' ] ) #NEWLINE# self . assertQuerysetEqual ( e1 . related . all ( ) , [ '<Tag: t2>' ] )