    def test_binding_exception(self, mock_write):
        """
        If there is a problem getting the key, do not attempt to write the file.
        """

        class MockException(Exception):

            def __str__(self):
                return "Mock Exception str"

        mock_cmd = mock.MagicMock()
        mock_cmd.context.server.static.get_server_key.side_effect = MockException()
        cli.update_server_key(mock_cmd)
        msg = 'Download server RSA key failed [Mock Exception str]'
        mock_cmd.prompt.render_failure_message.assert_called_once_with(msg)
        self.assertEqual(mock_write.call_count, 0)
The software does not validate, or incorrectly validates, a certificate.