def test_find_by_account_name(self): ''' Test case to test whether a user can find their account by account_name ''' self.new_user.save_user_info() test_user = User("Twitter", "Diane", "dee420") test_user.save_user_info() user_found = User.find_by_account_name("Twitter") self.assertEqual(user_found.username, test_user.username)
def find_account(account_name): ''' Function that finds an account by the account name and returns that account ''' return User.find_by_account_name(account_name)