diff mbox series

[15/16] auto-t: update PKEX test to use DeviceProvisioningAgent

Message ID 20240924120447.251761-15-prestwoj@gmail.com (mailing list archive)
State New
Headers show
Series [01/16] ie: add IE_AKM_IS_PSK | expand

Checks

Context Check Description
tedd_an/pre-ci_am success Success
prestwoj/iwd-ci-gitlint success GitLint

Commit Message

James Prestwood Sept. 24, 2024, 12:04 p.m. UTC
This also removes the unused import of the old SharedCodeAgent
object from the state change test
---
 autotests/testDPP/pkex_test.py         | 7 ++++---
 autotests/testDPP/state_change_test.py | 8 +-------
 2 files changed, 5 insertions(+), 10 deletions(-)
diff mbox series

Patch

diff --git a/autotests/testDPP/pkex_test.py b/autotests/testDPP/pkex_test.py
index a651c6f6..62172785 100644
--- a/autotests/testDPP/pkex_test.py
+++ b/autotests/testDPP/pkex_test.py
@@ -4,7 +4,7 @@  import unittest
 import sys
 
 sys.path.append('../util')
-from iwd import IWD, SharedCodeAgent, DeviceState
+from iwd import IWD, DeviceProvisioningAgent, DeviceState
 from iwd import DeviceProvisioning
 from wpas import Wpas
 from hostapd import HostapdCLI
@@ -37,9 +37,10 @@  class Test(unittest.TestCase):
         self.wd.wait_for_object_condition(device, condition)
 
         if agent:
-            self.agent = SharedCodeAgent(codes = {"test": "secret123"})
+            agent = DeviceProvisioningAgent(codes = {"test": "secret123"})
+            self.wd.register_dpp_agent(agent)
 
-            device.dpp_pkex_start_configurator(self.agent.path)
+            device.dpp_pkex_start_configurator()
         else:
             device.dpp_pkex_configure_enrollee('secret123', identifier="test")
 
diff --git a/autotests/testDPP/state_change_test.py b/autotests/testDPP/state_change_test.py
index d52f2b12..f1ac7d5e 100644
--- a/autotests/testDPP/state_change_test.py
+++ b/autotests/testDPP/state_change_test.py
@@ -4,14 +4,8 @@  import unittest
 import sys
 
 sys.path.append('../util')
-from iwd import IWD, SharedCodeAgent, DeviceState
-from iwd import DeviceProvisioning
-from wpas import Wpas
+from iwd import IWD
 from hostapd import HostapdCLI
-from hwsim import Hwsim
-from config import ctx
-from time import time
-import os
 
 class Test(unittest.TestCase):
     def auto_connect(self):