def test_parse_user_data(self): test_user_data = { 'additional_info': { 'age':132, 'work':'qwerfrhy', } } u = UserHandler('name') r = u.parse(test_user_data) self.assertEqual(r, {'age':132, 'work': 'qwerfrhy'})
def getUsers(): users = UserHandler().getUsers() return users
def login(): return UserHandler().authorize(request.get_json('data'))
def register(): return UserHandler().insertUser(request.get_json('data '))
def getUsersByUsername(username): return UserHandler().getUsersByUsername(username)
def getUsersMessages(): return UserHandler().getUsersEmails()
def getUserById(usrid): return UserHandler().getUserById(usrid)