From c058c6a34dd33cc718afad6417549faed2571536 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Tue, 16 Dec 2025 02:56:33 +0100 Subject: [PATCH] ts_51_011: Improve testing of EF_SMSP * add another set of test data (from a real-world SIM card) * switch from test_decode to test_de_encode as our encoder now works due to previous commits. Change-Id: I8d16e195641bb59b2c26072008f88434692c0cab --- pySim/ts_51_011.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/pySim/ts_51_011.py b/pySim/ts_51_011.py index 6e3f5e95..f87683fc 100644 --- a/pySim/ts_51_011.py +++ b/pySim/ts_51_011.py @@ -239,8 +239,17 @@ class EF_MSISDN(LinFixedEF): # TS 51.011 Section 10.5.6 class EF_SMSP(LinFixedEF): - # FIXME: re-encode fails / missing alpha_id at start of output - _test_decode = [ + _test_de_encode = [ + ( '534d5343ffffffffffffffffffffffffe1ffffffffffffffffffffffff0891945197109099f9ffffff0000a9', + { "alpha_id": "SMSC", "parameter_indicators": { "tp_dest_addr": False, "tp_sc_addr": True, + "tp_pid": True, "tp_dcs": True, "tp_vp": True }, + "tp_dest_addr": { "length": 255, "ton_npi": { "ext": True, "type_of_number": "reserved_for_extension", + "numbering_plan_id": "reserved_for_extension" }, + "call_number": "" }, + "tp_sc_addr": { "length": 8, "ton_npi": { "ext": True, "type_of_number": "international", + "numbering_plan_id": "isdn_e164" }, + "call_number": "4915790109999f" }, + "tp_pid": b"\x00", "tp_dcs": b"\x00", "tp_vp_minutes": 4320 } ), ( '454e6574776f726b73fffffffffffffff1ffffffffffffffffffffffffffffffffffffffffffffffff0000a7', { "alpha_id": "ENetworks", "parameter_indicators": { "tp_dest_addr": False, "tp_sc_addr": True, "tp_pid": True, "tp_dcs": True, "tp_vp": False },