@mock.patch('certbot._internal.main._delete_if_appropriate')
@mock.patch('certbot._internal.storage.RenewableCert')
@mock.patch('certbot._internal.storage.renewal_file_for_certname')
def test_revoke_by_certname_and_server(self, unused_mock_renewal_file_for_certname, mock_cert, mock_delete_if_appropriate):
    'Revoking with --server should use the server from the CLI'
    mock_cert.return_value = mock.MagicMock(cert_path=self.tmp_cert_path, server='https://acme.example')
    args = 'revoke --cert-name=example.com --server https://other.example'.split()
    mock_delete_if_appropriate.return_value = False
    self._call(args)
    self.mock_acme_client.assert_called_once_with(mock.ANY, mock.ANY, 'https://other.example')
    self.mock_success_revoke.assert_called_once_with(self.tmp_cert_path)
Revoking with --server should use the server from the CLI
@mock.patch('certbot._internal.main._delete_if_appropriate')
@mock.patch('certbot._internal.storage.RenewableCert')
@mock.patch('certbot._internal.storage.renewal_file_for_certname')
def test_revoke_by_certname_and_server(self, unused_mock_renewal_file_for_certname, mock_cert, mock_delete_if_appropriate):
    
    mock_cert.return_value = mock.MagicMock(cert_path=self.tmp_cert_path, server='https://acme.example')
    args = 'revoke --cert-name=example.com --server https://other.example'.split()
    mock_delete_if_appropriate.return_value = False
    self._call(args)
    self.mock_acme_client.assert_called_once_with(mock.ANY, mock.ANY, 'https://other.example')
    self.mock_success_revoke.assert_called_once_with(self.tmp_cert_path)