Writing Python unit tests for HTTP Clients

I have a nagios / icinga HTTP monitor based on PyCurl: check_pycurl3. Writing tests for this is difficult because: So with a little StackExchange googling, you can start Flask in a thread (remember to set daemon=True) like below: You also need to give it some time to start up before tests commence, I’ve used the …

Continue reading ‘Writing Python unit tests for HTTP Clients’ »