(self)
| 556 | |
| 557 | class 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') |
nothing calls this directly
no test coverage detected