def test_find_account(self): ''' this test case checks whether you can find an account using the user name ''' self.new_user.save_account() another_account=User("shema yvan","yvan-buravan") another_account.save_account() find_acc=User.find_by_name("shema yvan") self.assertEqual(find_acc.password,another_account.password)
def test_find_user_by_name(self): ''' test to check if we can find a user by name and display information ''' self.new_user.save_new_user() test_user = User("testy","Simpson") test_user.save_new_user() active_user = User.find_by_name("testy") print(active_user.user_name) self.assertEqual(active_user.user_name,test_user.user_name)
def find_accounts(name): ''' This finds the account ''' return User.find_by_name(name)