From ecfafc30c17bb760ffec29ebde4c55cb3689a356 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Perez Date: Sat, 10 Aug 2024 15:53:09 +0200 Subject: [PATCH] Fixes a broken test The test_use_default_inputs test function (test_atomic_svc.py) could not check a default value as the targeted file did exist. --- tests/test_atomic_svc.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/test_atomic_svc.py b/tests/test_atomic_svc.py index d07e602..1329d3d 100644 --- a/tests/test_atomic_svc.py +++ b/tests/test_atomic_svc.py @@ -181,10 +181,13 @@ def test_handle_multiline_command_shell_ifthen(self): def test_use_default_inputs(self, atomic_svc, atomic_test): platform = 'windows' string_to_analyze = '#{recon_commands} -a' - got = atomic_svc._use_default_inputs(test=atomic_test, + test = atomic_test + test['input_arguments']['recon_commands']['default'] = \ + 'PathToAtomicsFolder\\T1016\\src\\nonexistent-qakbot.bat' + got = atomic_svc._use_default_inputs(test=test, platform=platform, string_to_analyse=string_to_analyze) - assert got[0] == 'PathToAtomicsFolder\\T1016\\src\\qakbot.bat -a' + assert got[0] == 'PathToAtomicsFolder\\T1016\\src\\nonexistent-qakbot.bat -a' assert got[1] == [] def test_use_default_inputs_empty_string(self, atomic_svc, atomic_test):