File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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 )
You can’t perform that action at this time.
0 commit comments