laforge has uploaded this change for review.
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
---
M pySim/ts_51_011.py
1 file changed, 11 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/77/41677/1
diff --git a/pySim/ts_51_011.py b/pySim/ts_51_011.py
index 5b397cd..4799151 100644
--- a/pySim/ts_51_011.py
+++ b/pySim/ts_51_011.py
@@ -239,8 +239,17 @@
# 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 },
To view, visit change 41677. To unsubscribe, or for help writing mail filters, visit settings.