@@ -122,46 +122,11 @@ def test_unsupported_type_skips_param(argument_table, session):
122122 assert 'count' not in argument_table
123123
124124
125- def test_registers_operation_args_parsed_handler (argument_table , session ):
126- _inject (argument_table , session , [_make_context_param ('ForcePathStyle' )])
127- event_name = session .register .call_args [0 ][0 ]
128- assert event_name == 'operation-args-parsed.s3api.list-buckets'
129-
130-
131125def _apply (session , param_defs , ** attr_values ):
132126 parsed_args = argparse .Namespace (** attr_values )
133127 _apply_client_context_params (param_defs , session , parsed_args )
134128
135129
136- def test_flag_passed_sets_config (session ):
137- _apply (
138- session ,
139- [('force-path-style' , 'ForcePathStyle' )],
140- force_path_style = True ,
141- )
142- config = session .set_default_client_config .call_args [0 ][0 ]
143- assert config .client_context_params == {'ForcePathStyle' : True }
144-
145-
146- def test_no_flag_passed_does_not_set_config (session ):
147- _apply (
148- session ,
149- [('force-path-style' , 'ForcePathStyle' )],
150- force_path_style = None ,
151- )
152- session .set_default_client_config .assert_not_called ()
153-
154-
155- def test_negative_flag_sends_false (session ):
156- _apply (
157- session ,
158- [('force-path-style' , 'ForcePathStyle' )],
159- force_path_style = False ,
160- )
161- config = session .set_default_client_config .call_args [0 ][0 ]
162- assert config .client_context_params == {'ForcePathStyle' : False }
163-
164-
165130def test_merges_with_existing_config (session ):
166131 session .get_default_client_config .return_value = Config (read_timeout = 30 )
167132 _apply (
@@ -170,7 +135,7 @@ def test_merges_with_existing_config(session):
170135 force_path_style = True ,
171136 )
172137 config = session .set_default_client_config .call_args [0 ][0 ]
173- assert config .client_context_params == {'ForcePathStyle ' : True }
138+ assert config .client_context_params == {'force_path_style ' : True }
174139 assert config .read_timeout == 30
175140
176141
@@ -184,14 +149,3 @@ def test_string_add_to_parser():
184149 arg .add_to_parser (parser )
185150 result = parser .parse_args (['--endpoint' , 'custom.example.com' ])
186151 assert result .endpoint == 'custom.example.com'
187-
188-
189- def test_add_to_params_is_noop ():
190- arg = ClientContextParamArgument (
191- name = 'force-path-style' ,
192- context_param_name = 'ForcePathStyle' ,
193- param_type = 'boolean' ,
194- )
195- params = {}
196- arg .add_to_params (params , True )
197- assert params == {}
0 commit comments