2017-10-31 23:03:00 +01:00
|
|
|
#!/usr/bin/python3
|
|
|
|
|
|
|
|
import unittest
|
|
|
|
import sys
|
|
|
|
|
|
|
|
sys.path.append('../util')
|
|
|
|
import iwd
|
|
|
|
import validation
|
2019-10-24 19:53:23 +02:00
|
|
|
from validation import TestConnectAutoConnect
|
2017-10-31 23:03:00 +01:00
|
|
|
from iwd import IWD
|
|
|
|
|
|
|
|
class TestWpaNetwork(unittest.TestCase):
|
|
|
|
'''
|
2024-11-07 14:26:12 +01:00
|
|
|
The below test cases exercise the following connection scenarios:
|
2017-10-31 23:03:00 +01:00
|
|
|
|
|
|
|
Network config is
|
2019-10-24 19:53:23 +02:00
|
|
|
present at start time: Connect: AutoConnect: Result:
|
2017-10-31 23:03:00 +01:00
|
|
|
--------------------------------------------------------------------------
|
|
|
|
False True Connection succeeds
|
|
|
|
True True Connection succeeds
|
|
|
|
'''
|
|
|
|
|
|
|
|
def test_wpa(self):
|
2019-10-24 19:53:23 +02:00
|
|
|
tca = TestConnectAutoConnect()
|
2017-10-31 23:03:00 +01:00
|
|
|
tca.validate('ssidWPA', False, None, True)
|
|
|
|
tca.validate('ssidWPA', True, None, True)
|
|
|
|
|
|
|
|
IWD.clear_storage()
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
|
unittest.main(exit=True)
|