(self)
| 237 | |
| 238 | class TestProviderHelpCommand(TestHelpCommandBase): |
| 239 | def setUp(self): |
| 240 | super().setUp() |
| 241 | self.session.provider = None |
| 242 | self.command_table = {} |
| 243 | self.arg_table = {} |
| 244 | self.description = None |
| 245 | self.synopsis = None |
| 246 | self.usage = None |
| 247 | |
| 248 | # Create a temporary index file for ``aws help [command]`` to use. |
| 249 | self.tags_dict = {'topic-name-1': {}, 'topic-name-2': {}} |
| 250 | json_index = self.file_creator.create_file('index.json', '') |
| 251 | with open(json_index, 'w') as f: |
| 252 | json.dump(self.tags_dict, f, indent=4, sort_keys=True) |
| 253 | self.json_patch = mock.patch( |
| 254 | 'awscli.topictags.TopicTagDB.index_file', json_index |
| 255 | ) |
| 256 | self.json_patch.start() |
| 257 | |
| 258 | self.cmd = ProviderHelpCommand( |
| 259 | self.session, |
| 260 | self.command_table, |
| 261 | self.arg_table, |
| 262 | self.description, |
| 263 | self.synopsis, |
| 264 | self.usage, |
| 265 | ) |
| 266 | |
| 267 | def tearDown(self): |
| 268 | self.json_patch.stop() |
nothing calls this directly
no test coverage detected