MCPcopy Create free account
hub / github.com/aws/aws-cli / test_custom_command_paramfile

Method test_custom_command_paramfile

tests/unit/test_clidriver.py:688–707  ·  view source on GitHub ↗
(self, mock_handler)

Source from the content-addressed store, hash-verified

686
687 @mock.patch('awscli.paramfile.URIArgumentHandler', spec=URIArgumentHandler)
688 def test_custom_command_paramfile(self, mock_handler):
689 mock_paramfile = mock.Mock(autospec=True)
690 mock_paramfile.return_value = None
691 mock_handler.return_value = mock_paramfile
692
693 driver = create_clidriver()
694 driver.session.register('building-command-table', self.inject_command)
695
696 self.patch_make_request()
697 rc = driver.main('ec2 foo --bar file:///foo'.split())
698
699 self.assertEqual(rc, 0)
700
701 mock_paramfile.assert_any_call(
702 event_name='load-cli-arg.custom.foo.bar',
703 operation_name='foo',
704 param=mock.ANY,
705 service_name='custom',
706 value='file:///foo',
707 )
708
709 def test_custom_command_schema(self):
710 driver = create_clidriver()

Callers

nothing calls this directly

Calls 4

create_clidriverFunction · 0.90
registerMethod · 0.45
patch_make_requestMethod · 0.45
mainMethod · 0.45

Tested by

no test coverage detected