def test_success(self):
        mock_communicator = mock.MagicMock(spec_set=NodeCommunicator)
        node = "node address"

        lib.remote_client_destroy(mock_communicator, node)

        mock_communicator.call_node.assert_called_once_with(
            node, "remote/qdevice_net_client_destroy", None)
    def test_success(self):
        mock_communicator = mock.MagicMock(spec_set=NodeCommunicator)
        node = "node address"

        lib.remote_client_destroy(mock_communicator, node)

        mock_communicator.call_node.assert_called_once_with(
            node,
            "remote/qdevice_net_client_destroy",
            None
        )
    def test_comunication_error(self):
        mock_communicator = mock.MagicMock(spec_set=NodeCommunicator)
        mock_communicator.call_node.side_effect = NodeCommunicationException(
            "node address", "command", "reason")

        self.assertRaises(
            NodeCommunicationException, lambda: lib.remote_client_destroy(
                mock_communicator, "node address"))
    def test_comunication_error(self):
        mock_communicator = mock.MagicMock(spec_set=NodeCommunicator)
        mock_communicator.call_node.side_effect = NodeCommunicationException(
            "node address", "command", "reason"
        )

        self.assertRaises(
            NodeCommunicationException,
            lambda: lib.remote_client_destroy(mock_communicator, "node address")
        )
Beispiel #5
0
 def do_and_report(reporter, communicator, node):
     qdevice_net.remote_client_destroy(communicator, node)
     reporter.process(
         reports.qdevice_certificate_removed_from_node(node.label)
     )
Beispiel #6
0
 def do_and_report(reporter, communicator, node):
     qdevice_net.remote_client_destroy(communicator, node)
     reporter.process(
         reports.qdevice_certificate_removed_from_node(node.label))