|
|
|
|
|
by hynek
1463 days ago
|
|
> You don't need to build a facade for every api client (the api client is already a facade). I feel like this is covered by > Every rule and principle can be broken once you’ve fully understood its purpose. For example if an object already does have an idiomatic API, it’s probably not worth wrapping in an identical façade, just so it belongs to you. ? I personally prefer pytest-httpserver that is a bit more low-level, but I still prefer idiomatic calls over sprinkled http requests on business code. |
|
Even when I build those facades I don't mock them out - I just rely on VCR.
I've never used test server like pytest-httpserver. I don't think that would buy much vs using stubbing your low level network libraries like VCR does. The killer feature of VCR is that it records the real network calls on first usage. If pytest-httpserver can do that in a proxy mode it seems like a good way to go though.