#NEWLINE# def test_can_load_related_objects_among_other_relationships( self ) : #NEWLINE# #INDENT# alice = Person ( 'alice@example.com' , 'Alice' , 34 ) #NEWLINE# bob = Person ( 'bob@example.org' , 'Bob' , 66 ) #NEWLINE# carol = Person ( 'carol@example.net' , 'Carol' , 42 ) #NEWLINE# dave = Person ( 'dave@example.co.uk' , 'Dave' , 18 ) #NEWLINE# self . store . relate ( alice , 'LIKES' , bob ) #NEWLINE# self . store . relate ( alice , 'LIKES' , carol ) #NEWLINE# self . store . relate ( alice , 'DISLIKES' , dave ) #NEWLINE# self . store . save ( alice ) #NEWLINE# friends = self . store . load_related ( alice , 'LIKES' , Person ) #NEWLINE# assert ( friends == [ bob , carol ] ) #NEWLINE# enemies = self . store . load_related ( alice , 'DISLIKES' , Person ) #NEWLINE# assert ( enemies == [ dave ] )