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

Method setUp

tests/unit/test_help.py:239–265  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

237
238class 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()

Callers

nothing calls this directly

Calls 5

ProviderHelpCommandClass · 0.90
setUpMethod · 0.45
create_fileMethod · 0.45
dumpMethod · 0.45
startMethod · 0.45

Tested by

no test coverage detected