Ejemplo n.º 1
0
 def test__default_goes_to_local(self):
     self.forge.replace(runner, "local")
     expected_result = runner.local.popen([self.SSH, self.host, "command"], shell=True).and_return(
         self.forge.create_sentinel()
     )
     with self.forge.verified_replay_context():
         result = runner.through_ssh(self.host).popen(["command"])
     self.assertIs(result, expected_result)
Ejemplo n.º 2
0
 def test__default_goes_to_local(self):
     self.forge.replace(runner, "local")
     expected_result = runner.local.popen([self.SSH, self.host, "command"], shell=True).and_return(self.forge.create_sentinel())
     with self.forge.verified_replay_context():
         result = runner.through_ssh(self.host).popen(["command"])
     self.assertIs(result, expected_result)
Ejemplo n.º 3
0
 def setUp(self):
     super(TestSSHPopen, self).setUp()
     self.host = "some_host"
     self.runner = self.forge.create_mock(runner.Runner)
     self.ssh_runner = runner.through_ssh(self.host, base_runner=self.runner)
Ejemplo n.º 4
0
 def setUp(self):
     super(TestSSHPopen, self).setUp()
     self.host = "some_host"
     self.runner = self.forge.create_mock(runner.Runner)
     self.ssh_runner = runner.through_ssh(self.host, base_runner=self.runner)