File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 99 {% for list_value in value %}
1010 list '{{ key }}' '{{ list_value }}'
1111 {% endfor %}
12- {% else %}
13- {% if value is sameas true %}
14- option '{{ key }}' '1'
15- {% elif value is sameas false %}
16- option '{{ key }}' '0'
12+ {% elif value is boolean %}
13+ option '{{ key }}' '{{ value | int }}'
1714 {% else %}
1815 option '{{ key }}' '{{ value }}'
1916 {% endif %}
20- {% endif %}
2117 {% endif %}
2218 {% endfor %}
2319
Original file line number Diff line number Diff line change 99 {% for list_value in value %}
1010 list {{ key }} '{{ list_value }}'
1111 {% endfor %}
12- {% else %}
13- {% if value is sameas true %}
14- option {{ key }} '1'
15- {% elif value is sameas false %}
16- option {{ key }} '0'
12+ {% elif value is boolean %}
13+ option {{ key }} '{{ value | int }}'
1714 {% else %}
1815 option {{ key }} '{{ value }}'
1916 {% endif %}
20- {% endif %}
2117 {% endif %}
2218 {% endfor %}
2319
Original file line number Diff line number Diff line change @@ -194,7 +194,8 @@ def test_wireless_radio_disabled_0(self):
194194 output = o .render ()
195195 self .assertIn ("option 'disabled' '0'" , output )
196196
197- def test_render_wifi_issue_250_ssid_variants (self ):
197+ def test_render_ssid_boolean_bug (self ):
198+ """Regression test for https://github.com/openwisp/netjsonconfig/issues/383"""
198199 ssid_values = [
199200 "TrueGait Living Guest" ,
200201 "FalseGait Living Guest" ,
Original file line number Diff line number Diff line change @@ -63,7 +63,8 @@ def test_render_wifi_interface(self):
6363 expected = self ._tabs (self ._wifi_uci )
6464 self .assertEqual (o .render (), expected )
6565
66- def test_render_wifi_issue_250_ssid_variants (self ):
66+ def test_render_ssid_boolean_bug (self ):
67+ """Regression test for https://github.com/openwisp/netjsonconfig/issues/383"""
6768 ssid_values = [
6869 "TrueGait Living Guest" ,
6970 "FalseGait Living Guest" ,
You can’t perform that action at this time.
0 commit comments