@@ -25,10 +25,7 @@ def _is_json(plain: str) -> bool:
2525
2626@responses .activate  
2727@pytest .mark .parametrize ('output' , ['text' , 'json' ]) 
28- @pytest .mark .parametrize ('option_space' , ['scan' , 'global' ]) 
29- def  test_passing_output_option (
30-     output : str , option_space : str , scan_client : 'ScanClient' , api_token_response : responses .Response 
31- ) ->  None :
28+ def  test_passing_output_option (output : str , scan_client : 'ScanClient' , api_token_response : responses .Response ) ->  None :
3229    scan_type  =  'secret' 
3330
3431    responses .add (get_zipped_file_scan_response (get_zipped_file_scan_url (scan_type , scan_client )))
@@ -37,18 +34,7 @@ def test_passing_output_option(
3734    # This raises connection error on the attempt to report scan. 
3835    # It doesn't perform real request 
3936
40-     args  =  ['scan' , '--soft-fail' , 'path' , str (_PATH_TO_SCAN )]
41- 
42-     if  option_space  ==  'global' :
43-         global_args  =  ['--output' , output ]
44-         global_args .extend (args )
45- 
46-         args  =  global_args 
47-     elif  option_space  ==  'scan' :
48-         # test backward compatability with old style command 
49-         args .insert (2 , '--output' )
50-         args .insert (3 , output )
51- 
37+     args  =  ['--output' , output , 'scan' , '--soft-fail' , 'path' , str (_PATH_TO_SCAN )]
5238    result  =  CliRunner ().invoke (main_cli , args , env = CLI_ENV_VARS )
5339
5440    except_json  =  output  ==  'json' 
0 commit comments