def test_auhenticate(self): ''' test to check if we can restrict access by password authentication ''' self.new_account.save_account() test_account = Credentials(1,"Jerusha","Auma","*****@*****.**", "jeru") test_account.save_account() found_account = Credentials.authenticate_account("Jerusha","jeru") self.assertEqual(found_account.user_id, test_account.user_id)
def authenticate_account(first_name, password): ''' Function to authenticate account ''' return Credentials.authenticate_account(first_name, password)