mirror of
https://gitea.osmocom.org/sim-card/pysim.git
synced 2026-03-22 05:18:33 +03:00
global_platform: make --install-parameters-* independently optional
gen_install_parameters() had contradictory logic: the outer guard required all three arguments to be non-None/non-empty (making them mutually inclusive), while the inner checks then treated each one as optional. Make each parameter independently optional (defaulting to None) and remove the all-or-nothing guard from both the function and its caller. Simplify the function body to a straightforward single-pass construction of system_specific_params. Change-Id: I8756fb38016cdf0527fe2e21edb44381d1dc557f
This commit is contained in:
@@ -295,7 +295,7 @@ class Install_param_Test(unittest.TestCase):
|
||||
load_parameters = gen_install_parameters(256, 256, '010001001505000000000000000000000000')
|
||||
self.assertEqual(load_parameters, 'c900ef1cc8020100c7020100ca12010001001505000000000000000000000000')
|
||||
|
||||
load_parameters = gen_install_parameters(None, None, '')
|
||||
load_parameters = gen_install_parameters()
|
||||
self.assertEqual(load_parameters, 'c900')
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
Reference in New Issue
Block a user