def data(): equation_string = flask.request.args.get('equation') plotter = FieldPlotter() plotter.set_equation_from_string(equation_string) json_data = plotter.json_data() response = flask.make_response(json_data) response.mimetype = 'text/json' return response
def test_json_data(self): equation = sympy.sympify('x*y') plotter = FieldPlotter(equation) json_data = plotter.json_data()