MCPcopy Index your code
hub / github.com/aws/aws-cli / setUp

Method setUp

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

Source from the content-addressed store, hash-verified

556
557class TestFilePathCompleter(unittest.TestCase):
558 def setUp(self):
559 self.index = InMemoryIndex(
560 {
561 'command_names': {'': ['aws'], 'aws': []},
562 'arg_names': {'': {'aws': ['profile']}},
563 'arg_data': {
564 '': {
565 'aws': {
566 'profile': (
567 'profile',
568 'string',
569 'aws',
570 '',
571 None,
572 False,
573 False,
574 ),
575 }
576 }
577 },
578 }
579 )
580 fake_completer = mock.Mock()
581 fake_completer.get_completions.return_value = [
582 Completion(text='', display=[('', 'file')]),
583 Completion(text='', display=[('', 'folder/')]),
584 ]
585 self.parser = parser.CLIParser(self.index)
586 self.completer = basic.FilePathCompleter(path_completer=fake_completer)
587
588 def test_return_none_if_it_is_not_file_prefix(self):
589 parsed = self.parser.parse('aws --foo')

Callers

nothing calls this directly

Calls 1

InMemoryIndexClass · 0.90

Tested by

no test coverage detected