Beispiel #1
0
def test_01_bind_tr_rsp_encode():
    "Test Bind Transmitter Response encoding"
    P = BindTransmitterResp()

    P.system_id = CString("SMPP3TEST")
    P.interface_version = Integer(IV.SMPP_VERSION_5, 1)
    
    assert '00 00 00 1B 80 00 00 02 00 00 00 00 00 00 00 01 53 4D 50 50 33 54 45 53 54 00 50 ' == hex_convert(P.encode(), 150)
Beispiel #2
0
def test_02_bind_tr_rsp_decode():
    "Test Bind Transmitter Response decoding"
    data = b'\x00\x00\x00\x1B\x80\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x01SMPP3TEST\x00\x50'
    P = BindTransmitterResp.decode(data)
    assert '00 00 00 1B 80 00 00 02 00 00 00 00 00 00 00 01 53 4D 50 50 33 54 45 53 54 00 50 ' == hex_convert(P.encode(), 150)