Esempio n. 1
0
    def test_process_host_syncs_to_buffer(self):
        process_host('testhost')

        self.sync_to_buffer.assert_called_once_with('testhost', self.sshdriver.return_value)
Esempio n. 2
0
    def test_process_host_skips_host_if_can_not_establish_connection(self):
        self.sshdriver.side_effect = EOFError

        process_host('testhost')

        self.assertEqual(0, len(self.sync_to_buffer.mock_calls))
Esempio n. 3
0
    def test_process_host_instantiates_ssh_driver(self):
        process_host('testhost')

        self.sshdriver.assert_called_once_with('testhost')