#NEWLINE# def test_reverse_relations( self ) : #NEWLINE# #INDENT# '\n        Querying across reverse relations and then another relation should\n        insert outer joins correctly so as not to exclude results.\n        ' #NEWLINE# obj = OuterA . objects . create ( ) #NEWLINE# self . assertQuerysetEqual ( OuterA . objects . filter ( inner__second = None ) , [ '<OuterA: OuterA object>' ] ) #NEWLINE# self . assertQuerysetEqual ( OuterA . objects . filter ( inner__second__data = None ) , [ '<OuterA: OuterA object>' ] ) #NEWLINE# inner_obj = Inner . objects . create ( first = objB ) #NEWLINE# self . assertQuerysetEqual ( Inner . objects . filter ( first__inner__second = None ) , [ '<Inner: Inner object>' ] ) #NEWLINE# objB = OuterB . objects . create ( data = 'reverse' ) #NEWLINE# self . assertQuerysetEqual ( OuterB . objects . filter ( inner__isnull = False ) , [ ] ) #NEWLINE# Inner . objects . create ( first = obj ) #NEWLINE# self . assertQuerysetEqual ( OuterB . objects . exclude ( inner__isnull = False ) , [ '<OuterB: OuterB object>' ] )