@@ -69,9 +69,7 @@ def tearDown(self):
6969"""
7070
7171 def test_data_parse_config_json (self ):
72- dnode = self .ctx .parse_data_mem (
73- self .JSON_CONFIG , "json" , validation_no_state = True
74- )
72+ dnode = self .ctx .parse_data_mem (self .JSON_CONFIG , "json" , no_state = True )
7573 self .assertIsInstance (dnode , DContainer )
7674 try :
7775 j = dnode .print_mem ("json" , with_siblings = True )
@@ -113,9 +111,7 @@ def test_data_parse_config_json(self):
113111"""
114112
115113 def test_data_add_path (self ):
116- dnode = self .ctx .parse_data_mem (
117- self .JSON_CONFIG , "json" , validation_no_state = True
118- )
114+ dnode = self .ctx .parse_data_mem (self .JSON_CONFIG , "json" , no_state = True )
119115 dnode .new_path (
120116 '/yolo-system:conf/url[host="barfoo.com"][proto="http"]/path' ,
121117 "/barfoo/index.html" ,
@@ -131,13 +127,13 @@ def test_data_add_path(self):
131127
132128 def test_data_parse_config_json_file (self ):
133129 with open (self .JSON_CONFIG_FILE , encoding = "utf-8" ) as f :
134- dnode = self .ctx .parse_data_file (f , "json" , validation_no_state = True )
130+ dnode = self .ctx .parse_data_file (f , "json" , no_state = True )
135131 self .assertIsInstance (dnode , DContainer )
136132 dnode .free ()
137133
138134 with open (self .JSON_CONFIG_FILE , encoding = "utf-8" ) as f :
139135 dnode = self .ctx .parse_data (
140- "json" , in_data = f , in_type = IOType .FILE , validation_no_state = True
136+ "json" , in_data = f , in_type = IOType .FILE , no_state = True
141137 )
142138 self .assertIsInstance (dnode , DContainer )
143139 dnode .free ()
@@ -146,7 +142,7 @@ def test_data_parse_config_json_file(self):
146142 "json" ,
147143 in_data = self .JSON_CONFIG_FILE ,
148144 in_type = IOType .FILEPATH ,
149- validation_no_state = True ,
145+ no_state = True ,
150146 )
151147 self .assertIsInstance (dnode , DContainer )
152148 dnode .free ()
@@ -180,9 +176,7 @@ def test_data_parse_config_json_file(self):
180176"""
181177
182178 def test_data_parse_state_json (self ):
183- dnode = self .ctx .parse_data_mem (
184- self .JSON_STATE , "json" , validation_validate_present = True
185- )
179+ dnode = self .ctx .parse_data_mem (self .JSON_STATE , "json" , validate_present = True )
186180 self .assertIsInstance (dnode , DContainer )
187181 try :
188182 j = dnode .print_mem ("json" , with_siblings = True )
@@ -213,9 +207,7 @@ def test_data_parse_state_json(self):
213207"""
214208
215209 def test_data_parse_config_xml (self ):
216- dnode = self .ctx .parse_data_mem (
217- self .XML_CONFIG , "xml" , validation_validate_present = True
218- )
210+ dnode = self .ctx .parse_data_mem (self .XML_CONFIG , "xml" , validate_present = True )
219211 self .assertIsInstance (dnode , DContainer )
220212 try :
221213 xml = dnode .print_mem ("xml" , with_siblings = True )
@@ -246,9 +238,7 @@ def test_data_parse_config_xml(self):
246238"""
247239
248240 def test_data_parse_data_xml (self ):
249- dnode = self .ctx .parse_data_mem (
250- self .XML_STATE , "xml" , validation_validate_present = True
251- )
241+ dnode = self .ctx .parse_data_mem (self .XML_STATE , "xml" , validate_present = True )
252242 self .assertIsInstance (dnode , DContainer )
253243 try :
254244 xml = dnode .print ("xml" , out_type = IOType .MEMORY , with_siblings = True )
@@ -363,9 +353,7 @@ def test_data_create_invalid_regexp(self):
363353 }
364354
365355 def test_data_to_dict_config (self ):
366- dnode = self .ctx .parse_data_mem (
367- self .JSON_CONFIG , "json" , validation_validate_present = True
368- )
356+ dnode = self .ctx .parse_data_mem (self .JSON_CONFIG , "json" , validate_present = True )
369357 self .assertIsInstance (dnode , DContainer )
370358 try :
371359 dic = dnode .print_dict ()
@@ -747,11 +735,11 @@ def test_notification_from_dict_module(self):
747735
748736 def test_data_diff (self ):
749737 dnode1 = self .ctx .parse_data_mem (
750- self .XML_DIFF_STATE1 , "xml" , validation_validate_present = True
738+ self .XML_DIFF_STATE1 , "xml" , validate_present = True
751739 )
752740 self .assertIsInstance (dnode1 , DContainer )
753741 dnode2 = self .ctx .parse_data_mem (
754- self .XML_DIFF_STATE2 , "xml" , validation_validate_present = True
742+ self .XML_DIFF_STATE2 , "xml" , validate_present = True
755743 )
756744 self .assertIsInstance (dnode2 , DContainer )
757745
@@ -761,9 +749,7 @@ def test_data_diff(self):
761749 dnode2 .free ()
762750
763751 def test_find_one (self ):
764- dnode = self .ctx .parse_data_mem (
765- self .JSON_CONFIG , "json" , validation_validate_present = True
766- )
752+ dnode = self .ctx .parse_data_mem (self .JSON_CONFIG , "json" , validate_present = True )
767753 self .assertIsInstance (dnode , DContainer )
768754 try :
769755 hostname = dnode .find_one ("hostname" )
@@ -773,9 +759,7 @@ def test_find_one(self):
773759 dnode .free ()
774760
775761 def test_find_all (self ):
776- dnode = self .ctx .parse_data_mem (
777- self .JSON_CONFIG , "json" , validation_validate_present = True
778- )
762+ dnode = self .ctx .parse_data_mem (self .JSON_CONFIG , "json" , validate_present = True )
779763 self .assertIsInstance (dnode , DContainer )
780764 try :
781765 urls = dnode .find_all ("url" )
0 commit comments