File tree Expand file tree Collapse file tree
netjsonconfig/backends/openwrt Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ import re
2+
13from ..base .renderer import BaseRenderer
24
35
@@ -16,8 +18,7 @@ def cleanup(self, output):
1618 .replace ("\n option" , "\n \t option" )
1719 .replace ("\n list" , "\n \t list" )
1820 )
19- import re
20- # convert 'True' to '1' and 'False' to '0', but only on whole words bounded by quotes e.g. 'True' -> '1'
21+ # convert True to 1 and False to 0 (exact match only, not substrings)
2122 output = re .sub (r"'True'" , "'1'" , output )
2223 output = re .sub (r"'False'" , "'0'" , output )
2324 # max 2 consecutive \n delimiters
Original file line number Diff line number Diff line change @@ -77,7 +77,6 @@ def test_render_wifi_issue_250_false_ssid(self):
7777 expected_uci = self ._wifi_uci .replace ("'MyWifiAP'" , "'FalseGait Living Guest'" )
7878 self .assertEqual (o .render (), self ._tabs (expected_uci ))
7979
80-
8180 def test_parse_wifi_interface (self ):
8281 o = OpenWrt (native = self ._wifi_uci )
8382 self .assertDictEqual (o .config , self ._wifi_netjson )
You can’t perform that action at this time.
0 commit comments