test_mqman.py 248 B

123456789101112
  1. # coding: utf-8
  2. from hsyclibs import mqman
  3. def test_mqman_client():
  4. client = mqman.RpcClient('tieta')
  5. ret = client.call(b'hi')
  6. print(ret)
  7. def test_mqman_server():
  8. mqman.RpcServer(lambda x: b'hi ' + x, 'tieta').start_consuming()