

def test_json():
    (server, session, transport, conn) = _get_test_environment()
    transport.recv(proto.message(None, dict(a=10, b=20)))
    eq_(conn.pop_incoming(), dict(a=10, b=20))
    eq_(transport.pop_outgoing(), proto.message(None, dict(a=10, b=20)))

dataset/ETHPy150Open mrjoes/tornadio2/tests/session_test.py test_json/original