diff mbox series

[4/4] auto-t: add test for scanning in AP mode

Message ID 20221103170050.379587-4-prestwoj@gmail.com (mailing list archive)
State Accepted, archived
Headers show
Series [1/4] doc: document AP properties PairwiseCiphers/GroupCipher | expand

Checks

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

Commit Message

James Prestwood Nov. 3, 2022, 5 p.m. UTC
---
 autotests/testAP/scan_test.py | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
 create mode 100644 autotests/testAP/scan_test.py
diff mbox series

Patch

diff --git a/autotests/testAP/scan_test.py b/autotests/testAP/scan_test.py
new file mode 100644
index 00000000..0935912c
--- /dev/null
+++ b/autotests/testAP/scan_test.py
@@ -0,0 +1,20 @@ 
+#! /usr/bin/python3
+
+import unittest
+
+from iwd import IWD
+
+class Test(unittest.TestCase):
+    def test_ap_scan(self):
+        wd = IWD(True)
+
+        dev = wd.list_devices(1)[0]
+
+        dev.start_ap('TestAP2', 'Password2')
+
+        dev.scan()
+
+        networks = dev.get_ordered_networks()
+
+        self.assertTrue(len(networks) == 1)
+        self.assertTrue(networks[0]['Name'] == 'TestAP1')