diff --git a/autotests/testAddressRandomization/connection_test.py b/autotests/testAddressRandomization/connection_test.py index 32163e0f..f9f62f7a 100644 --- a/autotests/testAddressRandomization/connection_test.py +++ b/autotests/testAddressRandomization/connection_test.py @@ -46,7 +46,7 @@ class Test(unittest.TestCase): perm_addr = device.address # 1. Test per-network deterministic MAC generation - os.system('cat pernetwork.psk > /tmp/iwd/ssidCCMP.psk') + IWD.copy_to_storage('pernetwork.psk', name='ssidCCMP.psk') new_addr = self.try_connection(wd) self.assertNotEqual(perm_addr, new_addr) # try again to ensure the generation was deterministic @@ -54,7 +54,7 @@ class Test(unittest.TestCase): self.assertEqual(new_addr, new_addr2) # 2. Test FullAddressRandomization - os.system('cat full_random.psk > /tmp/iwd/ssidCCMP.psk') + IWD.copy_to_storage('full_random.psk', name='ssidCCMP.psk') new_addr = self.try_connection(wd) self.assertNotEqual(perm_addr, new_addr) # try again to make sure the generation was random @@ -62,7 +62,7 @@ class Test(unittest.TestCase): self.assertNotEqual(new_addr, new_addr2) # 3. Test AddressOverride - os.system('cat override.psk > /tmp/iwd/ssidCCMP.psk') + IWD.copy_to_storage('override.psk', name='ssidCCMP.psk') new_addr = self.try_connection(wd) self.assertEqual(new_addr, 'e6:f6:38:a9:02:02')