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

def test_ajax_parse_err(self):

    with patch('capa.inputtypes.latex_preview') as mock_preview:
        mock_preview.side_effect = ParseException('Oopsie')
        response = self.the_input.handle_ajax('preview_formcalc', {'formula': 'x^2+1/2', 'request_start': 1})
    self.assertIn('error', response)
    self.assertEqual(response['error'], "Sorry,    couldn't    parse    formula")
