Beispiel #1
0
    def test_check_existing_user(self):
        """
	    Tests wether the login funtion works well
		"""
        self.new_user = User("Sylvia", "Elkwal", "Elukwal3")
        self.new_user.save_user()
        user2 = User("Caroline", "Mumo", "20172018")
        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,
            Credential.check_existing_user(user2.password, user2.first_name))
Beispiel #2
0
 def verify_user(first_name, password):
     """
 	Function that verifies the existance of the user before creating credentials
 	"""
     checking_existing_user = Credential.check_existing_user(first_name, password)
     return check_existing_user