From 82b57403c79de04934da264e0be363ba99f5b797 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Tue, 16 Dec 2025 02:52:10 +0100 Subject: [PATCH] unittest/test_files.TransparentEF_Test: Actually test encoder In the test_encode_file() method, we should actually test the encoder, and not the decoder. I suppose this was a copy+paste mistake at some point? In the LinearFixedEF_Test.test_encoder_record we were already testing the encoder. Just TransparentEF_Test got it wrong... Change-Id: Id23305a78ab9acd2e006f2b26b72408795844d23 --- tests/unittests/test_files.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/unittests/test_files.py b/tests/unittests/test_files.py index a3ccf065..ab707717 100755 --- a/tests/unittests/test_files.py +++ b/tests/unittests/test_files.py @@ -256,8 +256,8 @@ class TransparentEF_Test(unittest.TestCase): encoded = t[0] decoded = t[1] logging.debug("Testing encode of %s", name) - re_dec = inst.decode_hex(encoded) - self.assertEqual(decoded, re_dec) + re_enc = inst.encode_hex(decoded) + self.assertEqual(encoded, re_enc) def test_de_encode_file(self): """Test the decoder and encoder for a transparent EF. Performs first a decoder