@mock.patch('certbot._internal.eff.handle_subscription')
def test_certonly_new_request_failure(self, mock_subscription):
    mock_client = mock.MagicMock()
    mock_client.obtain_and_enroll_certificate.return_value = False
    self.assertRaises(errors.Error, self._certonly_new_request_common, mock_client)
    self.assertFalse(mock_subscription.called)
@mock.patch('certbot._internal.eff.handle_subscription')
def test_certonly_new_request_failure(self, mock_subscription):
    mock_client = mock.MagicMock()
    mock_client.obtain_and_enroll_certificate.return_value = False
    self.assertRaises(errors.Error, self._certonly_new_request_common, mock_client)
    self.assertFalse(mock_subscription.called)