Ejemplo n.º 1
0
def test_client_every_new():
    user_provider = HttpClient(url="http://{0}{1}".format('zookeeper:38081/', 'com.ofpay.demo.api.UserProvider2'))
    print user_provider.getUser('A003')
    print user_provider.queryUser(
        {u'age': 18, u'time': 1428463514153, u'sex': u'MAN', u'id': u'A003', u'name': u'zhangsan'})
    print user_provider.queryAll()
    print user_provider.isLimit('MAN', 'Joe')
    print user_provider('getUser', 'A005')
Ejemplo n.º 2
0
def test_client_every_new():
    user_provider = HttpClient(url="http://{0}{1}".format('zookeeper:38081/', 'com.ofpay.demo.api.UserProvider2'))
    print user_provider.getUser('A003')
    print user_provider.queryUser(
        {u'age': 18, u'time': 1428463514153, u'sex': u'MAN', u'id': u'A003', u'name': u'zhangsan'})
    print user_provider.queryAll()
    print user_provider.isLimit('MAN', 'Joe')
    print user_provider('getUser', 'A005')
Ejemplo n.º 3
0
def test_client():
    user_provider = HttpClient(url="http://{0}{1}".format('172.19.3.111:38080/', 'com.ofpay.demo.api.UserProvider'))
    for x in range(number):
        user_provider.getUser('A003')
        user_provider.queryUser(
            {u'age': 18, u'time': 1428463514153, u'sex': u'MAN', u'id': u'A003', u'name': u'zhangsan'})
        # user_provider.queryAll()
        user_provider.isLimit('MAN', 'Joe')
        user_provider('getUser', 'A005')
def test_client():
    user_provider = HttpClient(url="http://{0}{1}".format(
        '172.19.3.111:38080/', 'com.ofpay.demo.api.UserProvider'))
    for x in range(number):
        user_provider.getUser('A003')
        user_provider.queryUser({
            u'age': 18,
            u'time': 1428463514153,
            u'sex': u'MAN',
            u'id': u'A003',
            u'name': u'zhangsan'
        })
        # user_provider.queryAll()
        user_provider.isLimit('MAN', 'Joe')
        user_provider('getUser', 'A005')