def test_delete_not_ok(self):
        module = MagicMock()
        module.exit_json = MagicMock()

        k = DOKubernetes(module)

        k.get_kubernetes = MagicMock()
        k.get_kubernetes.return_value = None

        k.delete()
        k.module.exit_json.assert_called()
    def test_delete_ok(self):
        module = MagicMock()
        module.exit_json = MagicMock()

        k = DOKubernetes(module)

        k.get_kubernetes = MagicMock()

        k.rest = MagicMock()
        k.rest.delete = MagicMock()
        k.rest.delete.return_value.id = 42
        k.rest.delete.return_value.status_code = 204

        k.delete()
        k.module.exit_json.assert_called()