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

Method setUp

tests/functional/test_output.py:29–53  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

27
28class TestOutput(BaseAWSCommandParamsTest):
29 def setUp(self):
30 # Patch this before super, in case called on import
31 self.patch_colorama_init = mock.patch('colorama.init')
32 self.mock_colorama_init = self.patch_colorama_init.start()
33
34 super().setUp()
35 self.files = FileCreator()
36
37 self.patch_popen = mock.patch('awscli.utils.Popen')
38 self.mock_popen = self.patch_popen.start()
39
40 self.patch_tty = mock.patch('awscli.utils.is_a_tty')
41 self.mock_is_a_tty = self.patch_tty.start()
42 self.mock_is_a_tty.return_value = True
43
44 self.cmdline = 'ec2 describe-regions'
45 self.parsed_response = {
46 "Regions": [
47 {
48 "Endpoint": "ec2.ap-south-1.amazonaws.com",
49 "RegionName": "ap-south-1",
50 },
51 ]
52 }
53 self.expected_content = self.get_expected_content(self.parsed_response)
54
55 def tearDown(self):
56 super().tearDown()

Callers

nothing calls this directly

Calls 3

get_expected_contentMethod · 0.95
FileCreatorClass · 0.90
startMethod · 0.45

Tested by

no test coverage detected