Example #1
0
def verify_user(user_name, password):
    '''
    Function that veryfies the existing user
    
    '''
    check_user = Credentials.check_user(user_name, 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('Philip','Kariuki','*****@*****.**','11223344')
		self.new_user.save_user()
		user2 = User('Philip','Kariuki','*****@*****.**','11223344')
		user2.save_user()

		for user in User.user_list:
			if user.first_name == user2.first_name and user.password == user2.password:
				current_user = user.first_name
		return current_user

		self.assertEqual(current_user,Credentials.check_user(user2.password,user2.first_name))
    def test_check_user(self):
        '''
        Test case to test whether login feature is functional.
        '''
        self.new_user = User('Cheryl', 'Muli', 'test123')
        self.new_user.save_user()
        user2 = User('Cheryl', 'Muli', 'test123')
        user2.save_user()

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

        self.assertEqual(
            current_user,
            Credentials.check_user(user2.password, user2.first_name))
Example #4
0
def verify_user(f_name, password):
    '''
	Function that verifies the existance of the user before creating credentials
	'''
    checking_user = Credentials.check_user(f_name, password)
    return checking_user
Example #5
0
def verify_user(first_name, password):
    '''
	Checks the existance of a user before creating credentials
	'''
    checks_user = Credentials.check_user(first_name, password)
    return checks_user
Example #6
0
def find_user(user_name, password):
    '''
    Function that confirms user exists
    '''
    check_user = Credentials.check_user(username, password)
    return check_user