@@ -421,18 +421,17 @@ def test_streaming_command_on_server(self):
421
421
def _assertCorrectConfiguration (self , command , test_name ):
422
422
expected_file_location = os .path .join ('_expected_results' , test_name + '.txt' )
423
423
output_file_location = os .path .join ('output' , test_name + '.csv' )
424
+ file_path = JSONEncoder ().encode (TestSearchCommandsApp ._data_file (os .path .join ('input' , 'counts.csv' )))
424
425
with TestSearchCommandsApp ._open_data_file (os .path .join ('input' , '_empty.csv' ), 'r' ) as input_file :
425
426
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' ))
428
427
command .process (
429
428
[
430
429
command .name ,
431
430
'__GETINFO__' ,
432
431
'boolean=false' ,
433
432
'duration=00:00:10' ,
434
433
'fieldname=foo' ,
435
- 'file=%s' % encoder . encode ( file_path ) ,
434
+ 'file=%s' % file_path ,
436
435
'integer=10' ,
437
436
'optionname=foo_bar' ,
438
437
'regularexpression="\\ \\ w+"' ,
@@ -442,7 +441,7 @@ def _assertCorrectConfiguration(self, command, test_name):
442
441
output_file )
443
442
actual = str (command .configuration )
444
443
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 )
446
445
self .assertMultiLineEqual (expected , actual )
447
446
448
447
def _assertCorrectOutputFile (self , name ):
0 commit comments