コード例 #1
0
ファイル: test_session_pdus.py プロジェクト: kashifpk/smpp5
def test_01_bind_rcr_encode():
    "test Bind Receiver encoding"
    P = BindReceiver()
    
    P.system_id = CString("SMPP3TEST")
    P.password = CString("secret08")
    P.system_type = CString("SUBMIT1")
    P.interface_version = Integer(IV.SMPP_VERSION_5, 1)
    P.addr_ton = Integer(TON.INTERNATIONAL, 1)
    P.addr_npi = Integer(NPI.ISDN, 1)
    P.address_range = CString('')


    assert '00 00 00 2F 00 00 00 01 00 00 00 00 00 00 00 01 53 4D 50 50 33 54 45 53 54 00 73 65 63 72 65 74 30 38 00 53 55 42 4D 49 54 31 00 50 01 01 00 ' == hex_convert(P.encode(), 150)