Skip to content

Commit 45ed180

Browse files
author
David Noble
committed
Fixed test for Windows, the result of a problem with backslashes in JSON encoded text.
1 parent a85405a commit 45ed180

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests/searchcommands/test_search_command.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ def test_process_scpv2(self):
393393

394394
getinfo_metadata = metadata.format(
395395
dispatch_dir=encode_string(dispatch_dir),
396-
logging_configuration=logging_configuration,
396+
logging_configuration=encode_string(logging_configuration)[1:-1],
397397
logging_level=logging_level,
398398
record=('true' if record is True else 'false'),
399399
show_configuration=('true' if show_configuration is True else 'false'))
@@ -407,7 +407,7 @@ def test_process_scpv2(self):
407407

408408
command = TestCommand()
409409
result = StringIO()
410-
argv = ['test.py']
410+
argv = ['some-external-search-command.py']
411411

412412
self.assertEqual(command.logging_configuration, default_logging_configuration)
413413
self.assertEqual(command.logging_level, 'WARNING')
@@ -584,7 +584,7 @@ def test_process_scpv2(self):
584584

585585
getinfo_metadata = metadata.format(
586586
dispatch_dir=encode_string(dispatch_dir),
587-
logging_configuration=logging_configuration,
587+
logging_configuration=encode_string(logging_configuration)[1:-1],
588588
logging_level=logging_level,
589589
record=record,
590590
show_configuration=show_configuration)
@@ -631,7 +631,7 @@ def test_process_scpv2(self):
631631

632632
getinfo_metadata = metadata.format(
633633
dispatch_dir=encode_string(dispatch_dir),
634-
logging_configuration=logging_configuration,
634+
logging_configuration=encode_string(logging_configuration)[1:-1],
635635
logging_level=logging_level,
636636
record=('true' if record is True else 'false'),
637637
show_configuration=('true' if show_configuration is True else 'false'))

0 commit comments

Comments
 (0)