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

Method setUp

tests/unit/autocomplete/test_completer.py:503–528  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

501
502class TestProfileCompleter(unittest.TestCase):
503 def setUp(self):
504 self.index = InMemoryIndex(
505 {
506 'command_names': {'': ['aws'], 'aws': []},
507 'arg_names': {'': {'aws': ['profile']}},
508 'arg_data': {
509 '': {
510 'aws': {
511 'profile': (
512 'profile',
513 'string',
514 'aws',
515 '',
516 None,
517 False,
518 False,
519 ),
520 }
521 }
522 },
523 }
524 )
525 fake_session = mock.Mock()
526 fake_session.available_profiles = ['default', 'profile1', 'profile2']
527 self.parser = parser.CLIParser(self.index)
528 self.completer = basic.ProfileCompleter(session=fake_session)
529
530 def test_return_none_if_it_is_not_profile_option(self):
531 parsed = self.parser.parse('aws --foo')

Callers

nothing calls this directly

Calls 1

InMemoryIndexClass · 0.90

Tested by

no test coverage detected