@test_util.patch_get_utility()
def test_certonly_dry_run_new_request_success(self, mock_get_utility):
    mock_client = mock.MagicMock()
    mock_client.obtain_and_enroll_certificate.return_value = None
    self._certonly_new_request_common(mock_client, ['--dry-run'])
    self.assertEqual(mock_client.obtain_and_enroll_certificate.call_count, 1)
    self.assertTrue(('dry run' in mock_get_utility().add_message.call_args[0][0]))
    self.assertEqual(mock_get_utility().add_message.call_count, 1)
@test_util.patch_get_utility()
def test_certonly_dry_run_new_request_success(self, mock_get_utility):
    mock_client = mock.MagicMock()
    mock_client.obtain_and_enroll_certificate.return_value = None
    self._certonly_new_request_common(mock_client, ['--dry-run'])
    self.assertEqual(mock_client.obtain_and_enroll_certificate.call_count, 1)
    self.assertTrue(('dry run' in mock_get_utility().add_message.call_args[0][0]))
    self.assertEqual(mock_get_utility().add_message.call_count, 1)