Answer the question
In order to leave comments, you need to log in
Fake HTTP server for tests in Python?
Hello.
Please advise some solution for testing httplib/urllib2-dependent code.
There is a simple class that sends requests to the server, you need to emulate this server.
Don't want to do monkeypatching on httplib, urllib2.
Thank you.
Answer the question
In order to leave comments, you need to log in
Why do you call the test server "fake"? Take any microframework (for example, flask) and write yourself any api.
I did not quite understand what you need, but here is the server (for statics) in python
python -m SimpleHTTPServer 8080
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question