

def test_for_other_user(self):
    'Test the basic message for another user'
    self.client.login(username=self._get_user().username, password='password')
    user2 = self._get_user(username='john')
    messages.add_message(self.client, WARNING_PERSISTENT, 'Warning..', user=self)
    result = Message.objects.all()[0]
    self.assertEqual(result.user, user2)

dataset/ETHPy150Open AliLozano/django-messages-extends/messages_extends/tests.py MessagesTests.test_for_other_user/VarMisuse@58/90 `user2`->`self`