laforge has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/pysim/+/35804?usp=email )


Change subject: make our tests pass pylint
......................................................................

make our tests pass pylint

Change-Id: If3a9f178c3f915123178efe00269fce74f6e585d
---
M tests/test_globalplatform.py
M tests/test_tlv.py
2 files changed, 23 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/04/35804/1

diff --git a/tests/test_globalplatform.py b/tests/test_globalplatform.py
index bf5ffdb..df65816 100644
--- a/tests/test_globalplatform.py
+++ b/tests/test_globalplatform.py
@@ -65,12 +65,24 @@
         self.assertEqual(b2h(wrapped).upper(), 
'84F280020A4F00B21AAFA3EB2D1672')


-class SCP03_Test:
+class SCP03_Test(abc.ABC):
     """some kind of 'abstract base class' for a unittest.UnitTest, 
implementing common functionality for all
     of our SCP03 test caseses."""
     get_eid_cmd_plain = h2b('80E2910006BF3E035C015A')
     get_eid_rsp_plain = h2b('bf3e125a1089882119900000000000000000000005')

+    # must be overridden by derived classes
+    init_upd_cmd = b''
+    init_upd_rsp = b''
+    ext_auth_cmd = b''
+    get_eid_cmd = b''
+    get_eid_rsp = b''
+    keyset = None
+
+    @abc.abstractmethod
+    def assertEqual(self, *a, **k):
+        pass
+
     @property
     def host_challenge(self) -> bytes:
         return self.init_upd_cmd[5:]
diff --git a/tests/test_tlv.py b/tests/test_tlv.py
index 1e5000d..0e73ab1 100644
--- a/tests/test_tlv.py
+++ b/tests/test_tlv.py
@@ -17,6 +17,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.

 import unittest
+from construct import Int8ub
 from pySim.tlv import *

 class TestUtils(unittest.TestCase):

--
To view, visit https://gerrit.osmocom.org/c/pysim/+/35804?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: If3a9f178c3f915123178efe00269fce74f6e585d
Gerrit-Change-Number: 35804
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <[email protected]>
Gerrit-MessageType: newchange

Reply via email to