Beispiel #1
0
def username_startwith():
    startname = request.values.get("startwith", "")
    users = User.get_users_startwith(startname)
    return jsonify(users=[{
        'nickname': x.nickname,
        'id': str(x.id),
        'avatar': x.avatar
    } for x in users])
Beispiel #2
0
 def test_get_users_startwith(self):
     user    = User.get_users_startwith("1")[0]
     eq_(user,self.user)
Beispiel #3
0
def username_startwith():
    startname       = request.values.get("startwith", "")
    users           = User.get_users_startwith(startname)
    return jsonify(users=[{'nickname':x.nickname, 
                           'id':str(x.id), 
                           'avatar':x.avatar} for x in users])