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

Method setUp

tests/unit/test_utils.py:197–210  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

195
196class TestOutputStreamFactory(unittest.TestCase):
197 def setUp(self):
198 self.session = mock.Mock(session.Session)
199 self.popen = mock.Mock(subprocess.Popen)
200 self.environ = {}
201 self.stream_factory = OutputStreamFactory(
202 session=self.session,
203 popen=self.popen,
204 environ=self.environ,
205 )
206 self.pager = 'mypager --option'
207 self.set_session_pager(self.pager)
208 self.patch_tty = mock.patch('awscli.utils.is_a_tty')
209 self.mock_is_a_tty = self.patch_tty.start()
210 self.mock_is_a_tty.return_value = True
211
212 def tearDown(self):
213 self.patch_tty.stop()

Callers

nothing calls this directly

Calls 3

set_session_pagerMethod · 0.95
OutputStreamFactoryClass · 0.90
startMethod · 0.45

Tested by

no test coverage detected