Skip to content

Commit a99b17f

Browse files
committed
added test for access_point mode without encryption
1 parent 688d4ca commit a99b17f

1 file changed

Lines changed: 40 additions & 0 deletions

File tree

tests/airos/test_wpasupplicant.py

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,3 +201,43 @@ class TestWpasupplicantAccess(ConverterTest):
201201
"""
202202

203203
backend = WpasupplicantAirOS
204+
205+
def test_no_encryption(self):
206+
207+
o = self.backend({
208+
"interfaces": [
209+
{
210+
"type": "wireless",
211+
"name": "wlan0",
212+
"mac": "de:9f:db:30:c9:c5",
213+
"mtu": 1500,
214+
"txqueuelen": 1000,
215+
"autostart": True,
216+
"wireless": {
217+
"radio": "radio0",
218+
"mode": "access_point",
219+
"ssid": "ap-ssid-example",
220+
},
221+
"encryption": {
222+
"protocol": "none",
223+
},
224+
}
225+
]
226+
})
227+
228+
o.to_intermediate()
229+
230+
expected = [
231+
{
232+
'profile.1.network.1.ssid': 'ap-ssid-example',
233+
'profile.1.network.1.key_mgmt.1.name': 'NONE',
234+
'profile.1.network.2.key_mgmt.1.name': 'NONE',
235+
'profile.1.network.2.priority': 2,
236+
'profile.1.network.2.status': 'disabled',
237+
},
238+
{
239+
'status': 'enabled',
240+
}
241+
]
242+
243+
self.assertEqualConfig(o.intermediate_data['wpasupplicant'], expected)

0 commit comments

Comments
 (0)