

def test_missing_reverse(self):
    '\n        Ticket #13839: select_related() should NOT cache None\n        for missing objects on a reverse 1-1 relation.\n        '
    with self.assertNumQueries(1):
        user = User.objects.select_related('userprofile').get(username='bob')
        with user.assertRaises(UserProfile.DoesNotExist):
            user.userprofile

dataset/ETHPy150Open django/django/tests/select_related_onetoone/tests.py ReverseSelectRelatedTestCase.test_missing_reverse/VarMisuse@41/99 `self`->`user`