aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorHarald Welte <laforge@osmocom.org>2023-12-21 22:14:08 +0100
committerHarald Welte <laforge@osmocom.org>2023-12-22 09:13:10 +0100
commit2822dca9ec68ea14fac98e1a47a17735dde56ea4 (patch)
tree38f18931b60b6bc4c4a68c7b6f420c9dbe5128fc /tests
parent0ecbf63a02ce625f8ad4254d3f26ad4c2994ed69 (diff)
tests: use case-insensitive compare of hex strings
Diffstat (limited to 'tests')
-rwxr-xr-xtests/test_files.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/test_files.py b/tests/test_files.py
index fe520fb..733f04c 100755
--- a/tests/test_files.py
+++ b/tests/test_files.py
@@ -86,7 +86,7 @@ class LinFixed_Test(unittest.TestCase):
decoded = t[2]
logging.debug("Testing encode of %s", name)
re_enc = inst.encode_record_hex(decoded, rec_num)
- self.assertEqual(encoded, re_enc)
+ self.assertEqual(encoded.upper(), re_enc.upper())
def test_de_encode_record(self):
"""Test the decoder and encoder for a linear-fixed EF. Performs first a decoder
@@ -119,7 +119,7 @@ class LinFixed_Test(unittest.TestCase):
# re-encode the decoded data
logging.debug("Testing re-encode of %s", name)
re_enc = inst.encode_record_hex(re_dec, rec_num)
- self.assertEqual(encoded, re_enc)
+ self.assertEqual(encoded.upper(), re_enc.upper())
class TransRecEF_Test(unittest.TestCase):
@@ -182,7 +182,7 @@ class TransRecEF_Test(unittest.TestCase):
# re-encode the decoded data
logging.debug("Testing re-encode of %s", name)
re_enc = inst.encode_record_hex(re_dec)
- self.assertEqual(encoded, re_enc)
+ self.assertEqual(encoded.upper(), re_enc.upper())
class TransparentEF_Test(unittest.TestCase):
@@ -254,7 +254,7 @@ class TransparentEF_Test(unittest.TestCase):
logging.debug("Testing re-encode of %s", name)
re_dec = inst.decode_hex(encoded)
re_enc = inst.encode_hex(re_dec)
- self.assertEqual(encoded, re_enc)
+ self.assertEqual(encoded.upper(), re_enc.upper())
if __name__ == '__main__':