Esempio n. 1
0
    def test_confirm_user(self):
        '''
        a test to check whether the user that is trying to log in is a registered user
        '''
        self.new_user = User("Daniel", "Mutai", "abcd12")
        self.new_user.save_user()
        mpya = User("ddd", "ccc", "ab12")
        mpya.save_user()

        for user in User.users_list:
            if user.first_name == mpya.first_name and user.password == mpya.password:
                current_user = user.first_name
                return current_user
                self.assertEqual(
                    current_user,
                    Credential.check_user(mpya.firts_name, mpya.password))
Esempio n. 2
0
def verify_user(first_name, password):
    '''
    Function that verifies the existance of the user before creating credentials
    '''
    checking_user = Credential.check_user(first_name, password)
    return checking_user
Esempio n. 3
0
def verify_profile(first_name,password):
    '''
    function that verifies the existance of a user before continuing to the credentials
    '''
    verify_user = Credential.check_user(first_name,password)
    return verify_user