'With parse errors, ChemicalEquationInput should give an error message'

def test_ajax_parse_err(self):

    with patch('capa.inputtypes.chemcalc.render_to_html') as mock_render:
        mock_render.side_effect = ParseException(u'\u0227\u0188\u0188\u1e17\u019e\u0167\u1e17\u1e13    \u0167\u1e17\u1e8b\u0167    \u0192\u01ff\u0159    \u0167\u1e17\u015f\u0167\u012b\u019e\u0260')
        response = self.the_input.handle_ajax('preview_chemcalc', {'formula': 'H2O    +    invalid    chemistry'})
    self.assertIn('error', response)
    self.assertIn("Couldn't    parse    formula", response['error'])
