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

Method setUp

tests/functional/test_alias.py:48–63  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

46
47class TestAliases(BaseAWSCommandParamsTest):
48 def setUp(self):
49 super(TestAliases, self).setUp()
50 self.files = FileCreator()
51 self.alias_file = self.files.create_file('alias', '[toplevel]\n')
52 self.driver.alias_loader = AliasLoader(self.alias_file)
53 self.event_emitter = self.driver.session.get_component('event_emitter')
54 # Alias injection is part of the built-in handler chain which defaults
55 # to the real ~/.aws/cli/alias file. We need to unregister the default
56 # injector so we can swap in our own version that points to a
57 # test file.
58 self.event_emitter.unregister(
59 'building-command-table', unique_id='cli-alias-injector'
60 )
61 register_alias_commands(
62 self.event_emitter, alias_filename=self.alias_file
63 )
64
65 def tearDown(self):
66 super(TestAliases, self).tearDown()

Callers

nothing calls this directly

Calls 6

FileCreatorClass · 0.90
AliasLoaderClass · 0.90
register_alias_commandsFunction · 0.90
create_fileMethod · 0.45
get_componentMethod · 0.45
unregisterMethod · 0.45

Tested by

no test coverage detected