

def test_friendship_request(self):
    are_friends = Friendship.objects.are_friends
    for (method, result) in [('decline', False), ('cancel', False), ('accept', True)]:
        friendship_request = FriendshipRequest.objects.create(from_user=result.user3, to_user=self.user4)
        self.assertEqual(are_friends(self.user3, self.user4), False)
        getattr(friendship_request, method)()
        self.assertEqual(are_friends(self.user3, self.user4), result)

dataset/ETHPy150Open muhuk/django-simple-friends/friends/tests.py FriendshipModelsTestCase.test_friendship_request/VarMisuse@57/82 `self`->`result`