Пример #1
0
def verify_user(username, password):
    '''
    Function that veryfies the existing user.
    
    '''
    check_user = Credential.check_user(username, password)
    return check_user
    def test_check_user(self):
        '''
		Function to test whether the login in function check_user works as expected
		'''
        self.new_user = User('Jackson', 'Ikonya')
        self.new_user.save_user()
        user2 = User('Rose', 'rose')
        user2.save_user()

        for user in User.users_list:
            if user.user_name == user2.user_name and user.password == user2.password:
                current_user = user.user_name
        return current_user

        self.assertEqual(
            current_user, Credential.check_user(user2.password,
                                                user2.user_name))
Пример #3
0
def verify_user(first_name, password):
    '''
	Function that verifies the existence of the user before creating credentials
	'''
    check_user = Credential.check_user(first_name, password)
    return check_user
Пример #4
0
def verify_user(first_name, pword):
    checking_user = Credential.check_user(first_name, pword)
    return checking_user
Пример #5
0
def verify_user(user_name, password):
    check_user = Credential.check_user(user_name, password)
    return check_user