How to test Klein server in python

191 Views Asked by At

I have made an async http api in Python using Klein. I would like to test my requests using something like Unittest or similar.

I have found this but I'm not sure I'll be able to implement it remotely the same way.

Is there a correct and direct approach to do something similar to what was done in the example I've found?

Thanks in advance

1

There are 1 best solutions below

0
On BEST ANSWER

Have a look at the responses or requests-mock python libraries. They both provide great features for testing HTTP requests.