[Flask] simple query testing of forms in Flask

Piotr Grabowski kajocina at gmail.com
Fri Feb 2 04:52:37 EST 2018

Thanks Vladimir!

I am already using Sentry (and I love it, I highly recommend it to anyone
running Flask web apps). However, I wanted to take a proactive approach
here and check before the users learn the "hard way".
Maybe indeed the only way is to set up unit tests and check if returned
response by the app is correct.

If anyone has more ideas, I will be happy to hear them!


On Thu, Feb 1, 2018 at 7:39 PM, Vladimir Prokhoda <vladimirbright at gmail.com>

> Hi Piotr,
> take a look at https://docs.sentry.io/clients/python/integrations/flask/
> . It's rock solid service for tracking 500 responses from python web
> applications. I think you will easily detect queries that breaks your app.
> On Thu, Feb 1, 2018 at 7:32 PM, Piotr Grabowski <kajocina at gmail.com>
> wrote:
>> Hi there,
>> I have a Flask application that is visualizing data based on queries that
>> users make in a text form on the website. There is only a finite number of
>> queries that can be made (~15.000). However, for technical reasons some
>> queries sometimes fail, e.g. when a user misspells a query.
>> In most cases everything is handled well but I do occasionally see some
>> fringe cases that break the app and the users get a white screen.
>> My question: is there some simple solution that could help me iterate
>> over the list of possible queries (that I have) to check if they ever break
>> the app? I can imagine that a bash script could do this and just list all
>> cases which didn't return 200/OK from the server, but maybe there is a
>> nicer way to do it?
>> I already looked at http://flask.pocoo.org/docs/0.12/testing/ but have
>> no experience with this and need some quick fix before I learn how to write
>> proper Flask unit tests...
>> I'll be thankful for any tips!
>> Best,
>> Piotr
>> _______________________________________________
>> Flask mailing list
>> Flask at python.org
>> https://mail.python.org/mailman/listinfo/flask
> --
> Если есть трудное дело, поручите его лентяю: он найдет более легкое
> решение.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/flask/attachments/20180202/45ed3f80/attachment.html>

More information about the Flask mailing list