How to run Flask non-blocking so I can use it inside unittest setUp() ?

This page summarizes the projects mentioned and recommended in the original post on /r/learnpython

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • requests-mock

    Mocked responses for the requests library

  • I wouldn't run a real HTTP server to test your client. It's fiddly (as you already learned) and slow in execution. Instead you should mock the responses you 'receive' in your tests. With requests you can hack into the client's underlying adapter to achieve that, or use requests-mock if you don't want to do the hacking yourself.

  • Moto

    A library that allows you to easily mock out tests based on AWS infrastructure.

  • I'm also using moto to mock AWS API calls, which works by monkey-patcjing the requests library. These two libraries might clash.

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts