laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/pysim/+/41677?usp=email )

Change subject: ts_51_011: Improve testing of EF_SMSP
......................................................................

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(-)

Approvals:
  fixeria: Looks good to me, but someone else must approve
  Jenkins Builder: Verified
  laforge: Looks good to me, approved
  dexter: Looks good to me, approved




diff --git a/pySim/ts_51_011.py b/pySim/ts_51_011.py
index 6e3f5e9..f87683f 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 https://gerrit.osmocom.org/c/pysim/+/41677?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings?usp=email

Gerrit-MessageType: merged
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I8d16e195641bb59b2c26072008f88434692c0cab
Gerrit-Change-Number: 41677
Gerrit-PatchSet: 4
Gerrit-Owner: laforge <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <[email protected]>
Gerrit-Reviewer: fixeria <[email protected]>
Gerrit-Reviewer: laforge <[email protected]>
Gerrit-Reviewer: neels <[email protected]>

Reply via email to