示例#1
0
def test_01_bind_tcr_rsp_encode():
    "Test Bind Transceiver Response encoding"
    P = BindTransceiverResp()

    P.system_id = CString("SMPP3TEST")
    P.interface_version = Integer(IV.SMPP_VERSION_5, 1)
    
    assert '00 00 00 1B 80 00 00 09 00 00 00 00 00 00 00 01 53 4D 50 50 33 54 45 53 54 00 50 ' == hex_convert(P.encode(), 150)
示例#2
0
def test_02_bind_tcr_rsp_decode():
    "Test Bind Transceiver Response decoding"
    data = b'\x00\x00\x00\x1b\x80\x00\x00\x09\x00\x00\x00\x00\x00\x00\x00\x01SMPP3TEST\x00P'


    P = BindTransceiverResp.decode(data)
    assert '00 00 00 1B 80 00 00 09 00 00 00 00 00 00 00 01 53 4D 50 50 33 54 45 53 54 00 50 ' == hex_convert(P.encode(), 150)