  from __future__ import unicode_literals
  
  import unittest
  
  from django.core.exceptions import FieldError
  from django.test import SimpleTestCase, TestCase
  
  from .models import (
      AdvancedUserStat, Child1, Child2, Child3, Child4, Image, Parent1, Parent2,
 
</s> remove         with self.assertNumQueries(1):
 </s> add  </s> remove         with self.assertNumQueries(1):
 </s> add         with self.assertNumQueries(0): </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     @unittest.expectedFailure
 </s> add 
  from __future__ import unicode_literals
  


  from django.core.exceptions import FieldError
  from django.test import SimpleTestCase, TestCase
  
  from .models import (
      AdvancedUserStat, Child1, Child2, Child3, Child4, Image, Parent1, Parent2,
keep keep replace replace keep keep keep keep keep
 Fixed #26486 -- Fixed a select_related() + defer() MTI edge case. 
tests/select_related_onetoone/tests.py