Пример #1
0
    def test_find_user_by_account(self):
        '''
        test to check if we can find a user by account
        '''

        self.new_user.save_user()
        test_user = User("Mulki Suleiman", "Facebook", "trudet")
        test_user.save_user()

        found_user = User.find_by_account("Facebook")
        self.assertEqual(found_user.account, test_user.account)
Пример #2
0
def find_user(account):
    '''
    Function that finds a user by account name and returns the  user
    '''
    return User.find_by_account(account)