#NEWLINE# def test_reverse_relation_to_public( self ) : #NEWLINE# #INDENT# '\n        Tests that a reverse relationship through a foreign keys to public from a model inside TENANT_APPS works.\n        ' #NEWLINE# with tenant_context ( self . tenant ) : #NEWLINE# #INDENT# users = User . objects . all ( ) . select_related ( ) . order_by ( 'id' ) #NEWLINE# self . assertEqual ( ModelWithFkToPublicUser . objects . get ( pk = self . d1 . id ) , users [ 0 ] . modelwithfktopublicuser_set . all ( ) [ : 1 ] . get ( ) ) #NEWLINE# self . assertEqual ( ModelWithFkToPublicUser . objects . get ( pk = self . d2 . id ) , users [ 1 ] . modelwithfktopublicuser_set . all ( ) [ : 1 ] . get ( ) )