'With other errors, test that ChemicalEquationInput also logs it'

@patch('capa.inputtypes.log')
def test_ajax_other_err(self, mock_log):

    with patch('capa.inputtypes.chemcalc.render_to_html') as mock_render:
        mock_render.side_effect = Exception()
        response = self.the_input.handle_ajax('preview_chemcalc', {'formula': 'H2O    +    superterrible    chemistry'})
    mock_log.warning.assert_called_once_with('Error    while    previewing    chemical    formula', exc_info=True)
    self.assertIn('error', response)
    self.assertEqual(response['error'], 'Error    while    rendering    preview')
