

def login(self, **credentials):
    'This sets the user attibute for a logged in user'
    if super(MessagesClient, self).login(**credentials):
        self.user = authenticate(**credentials)
        return True
    else:
        self.user = AnonymousUser()
    return False

dataset/ETHPy150Open AliLozano/django-messages-extends/messages_extends/tests.py MessagesClient.login/original