mirror of
https://gitea.osmocom.org/sim-card/pysim.git
synced 2026-05-10 15:36:19 +03:00
card_key_provider: pass CardKeyFieldCryptor to constructor
We currently create the CardKeyFieldCryptor object inside the constructor of the concrete CardKeyProvider classes. There is currently no problem with that, but when we create the CardKeyFieldCryptor object first and then pass it as parameter to the constructor, we gain more flexibility in case we want to support other CardKeyFieldCryptor variants in the future. Related: SYS#6959
This commit is contained in:
@@ -20,7 +20,8 @@ class TestCardKeyProviderCsv(unittest.TestCase):
|
||||
"KIK3" : "00010204040506070809488B0C0D0E0F"}
|
||||
|
||||
csv_file_path = os.path.dirname(os.path.abspath(__file__)) + "/test_card_key_provider.csv"
|
||||
card_key_provider_register(CardKeyProviderCsv(csv_file_path, column_keys))
|
||||
card_key_field_cryptor = CardKeyFieldCryptor(column_keys)
|
||||
card_key_provider_register(CardKeyProviderCsv(csv_file_path, card_key_field_cryptor))
|
||||
super().__init__(*args, **kwargs)
|
||||
|
||||
def test_card_key_provider_get(self):
|
||||
|
||||
Reference in New Issue
Block a user