@@ -421,18 +421,17 @@ def test_streaming_command_on_server(self):
421421 def _assertCorrectConfiguration (self , command , test_name ):
422422 expected_file_location = os .path .join ('_expected_results' , test_name + '.txt' )
423423 output_file_location = os .path .join ('output' , test_name + '.csv' )
424+ file_path = JSONEncoder ().encode (TestSearchCommandsApp ._data_file (os .path .join ('input' , 'counts.csv' )))
424425 with TestSearchCommandsApp ._open_data_file (os .path .join ('input' , '_empty.csv' ), 'r' ) as input_file :
425426 with TestSearchCommandsApp ._open_data_file (output_file_location , 'w' ) as output_file :
426- encoder = JSONEncoder ()
427- file_path = TestSearchCommandsApp ._data_file (os .path .join ('input' , 'counts.csv' ))
428427 command .process (
429428 [
430429 command .name ,
431430 '__GETINFO__' ,
432431 'boolean=false' ,
433432 'duration=00:00:10' ,
434433 'fieldname=foo' ,
435- 'file=%s' % encoder . encode ( file_path ) ,
434+ 'file=%s' % file_path ,
436435 'integer=10' ,
437436 'optionname=foo_bar' ,
438437 'regularexpression="\\ \\ w+"' ,
@@ -442,7 +441,7 @@ def _assertCorrectConfiguration(self, command, test_name):
442441 output_file )
443442 actual = str (command .configuration )
444443 with TestSearchCommandsApp ._open_data_file (expected_file_location , 'r' ) as input_file :
445- expected = '' .join (input_file .readlines ())
444+ expected = '' .join (input_file .readlines ()). replace ( "{file}" , file_path )
446445 self .assertMultiLineEqual (expected , actual )
447446
448447 def _assertCorrectOutputFile (self , name ):
0 commit comments