mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-11-30 06:39:46 +01:00
9594b03a35
The tests basically remained the same with a few minor changes. The wiphy_map and in turn hostapd_map are no longer used. This was already partially converted a long time ago when the 'config' parameter was added to HostapdCLI. This patch fully converts all autotests to use 'config' rather than looking up by interface. Some test scripts were named 'test.py' which was fine before but the new rewrite actually loads each python test as a module. The name 'test' is too ambiguous and causes issues due to a native python module with the same name. All of these files were renamed to 'connection_test.py'.
29 lines
523 B
Python
29 lines
523 B
Python
#! /usr/bin/python3
|
|
|
|
import unittest
|
|
import sys
|
|
|
|
sys.path.append('../util')
|
|
import iwd
|
|
from iwd import IWD
|
|
|
|
class Test(unittest.TestCase):
|
|
def test_connection_success(self):
|
|
wd = IWD()
|
|
|
|
dev = wd.list_devices(1)[0]
|
|
|
|
with self.assertRaises(iwd.NotSupportedEx):
|
|
dev.start_ap('TestAP2', 'Password2')
|
|
|
|
@classmethod
|
|
def setUpClass(cls):
|
|
pass
|
|
|
|
@classmethod
|
|
def tearDownClass(cls):
|
|
IWD.clear_storage()
|
|
|
|
if __name__ == '__main__':
|
|
unittest.main(exit=True)
|