File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -203,18 +203,8 @@ def _call(self, args):
203203 self .main_parser .args .region ,
204204 endpoint_url = self .main_parser .args .endpoint_url )
205205 self .endpoint .verify = not self .main_parser .args .no_verify_ssl
206- self .session .emit (
207- 'before-operation.%s.%s' % (self .service .cli_name ,
208- self .operation .cli_name ),
209- service = self .service , operation = self .operation ,
210- endpoint = self .endpoint , params = params )
211206 if self .operation .can_paginate and self .main_parser .args .paginate :
212207 pages = self .operation .paginate (self .endpoint , ** params )
213- self .session .emit (
214- 'after-operation.%s.%s' % (self .service .cli_name ,
215- self .operation .cli_name ),
216- service = self .service , operation = self .operation ,
217- endpoint = self .endpoint , params = params )
218208 self ._display_response (self .operation , pages )
219209 # TODO: need to handle http error responses. I believe
220210 # this will be addressed with the plugin refactoring,
Original file line number Diff line number Diff line change @@ -172,21 +172,14 @@ def test_expected_events_are_emitted_in_order(self):
172172 'parser-created.s3' ,
173173 'parser-created.s3-list-objects' ,
174174 'process-cli-arg.s3.list-objects' ,
175- # Events fired when operation is being invoked.
176- 'before-operation.s3.list-objects' ,
177- 'after-operation.s3.list-objects' ,
178175 ])
179176
180177 def test_cli_driver_changes_args (self ):
181- actual_params = []
182178 emitter = HierarchicalEmitter (EventHooks ())
183179 emitter .register ('process-cli-arg.s3.list-objects' , self .serialize_param )
184- emitter .register ('before-operation' ,
185- lambda params , ** kwargs : actual_params .append (params ))
186180 self .session .emitter = emitter
187181 driver = CLIDriver (session = self .session )
188182 driver .main ('s3 list-objects --bucket foo' .split ())
189- self .assertEqual (actual_params , [{'bucket' : 'foo-altered!' }])
190183 self .assertIn (mock .call .paginate (mock .ANY , bucket = 'foo-altered!' ),
191184 self .session .operation .method_calls )
192185
You can’t perform that action at this time.
0 commit comments