              self.assertEqual(p.child1.name2, 'n2')
          p = qs.get(name2="n2")
          with self.assertNumQueries(1):
              self.assertEqual(p.child1.name1, 'n1')
          with self.assertNumQueries(1):
              self.assertEqual(p.child1.child4.name1, 'n1')
  
  
  class ReverseSelectRelatedValidationTests(SimpleTestCase):
      """
 
</s> remove         with self.assertNumQueries(1):
 </s> add         with self.assertNumQueries(0): </s> remove     @unittest.expectedFailure
 </s> add  </s> remove         qs = Parent2.objects.select_related('child1', 'child4').only(
 </s> add         qs = Parent2.objects.select_related('child1', 'child1__child4').only( </s> remove     @unittest.expectedFailure
 </s> add  </s> remove         # With a depth-based select_related, all deferred ForeignKeys are
        # deferred instead of traversed.
        with self.assertNumQueries(3):
 </s> add         # select_related() overrides defer().
        with self.assertNumQueries(1):
              self.assertEqual(p.child1.name2, 'n2')
          p = qs.get(name2="n2")
          with self.assertNumQueries(1):
              self.assertEqual(p.child1.name1, 'n1')

              self.assertEqual(p.child1.child4.name1, 'n1')
  
  
  class ReverseSelectRelatedValidationTests(SimpleTestCase):
      """
keep keep keep keep replace keep keep keep keep keep
 Fixed #26486 -- Fixed a select_related() + defer() MTI edge case. 
tests/select_related_onetoone/tests.py