예제 #1
0
    def test_process_host_syncs_to_inbox(self):
        process_host('testhost')

        self.sync_to_inbox.assert_called_once_with('testhost', self.sshdriver.return_value)
예제 #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_inbox.mock_calls))
예제 #3
0
    def test_process_host_instantiates_ssh_driver(self):
        process_host('testhost')

        self.sshdriver.assert_called_once_with('testhost')