Пример #1
0
    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'})
Пример #2
0
def getUsers():
    users = UserHandler().getUsers()
    return users
Пример #3
0
def login():
    return UserHandler().authorize(request.get_json('data'))
Пример #4
0
def register():
    return UserHandler().insertUser(request.get_json('data '))
Пример #5
0
def getUsersByUsername(username):
    return UserHandler().getUsersByUsername(username)
Пример #6
0
def getUsersMessages():
    return UserHandler().getUsersEmails()
Пример #7
0
def getUserById(usrid):
    return UserHandler().getUserById(usrid)