armchair dot tech
python | HOME | ABOUT | TAGS

Mocking Consul for fun and profit. (#python ) 2018-01-04
I’ve been creating a fun microservice tool that provides a single API frontend and merges data from multiple backends. Since the app itself relies entirely on external data, I was wondering how in the world I would write unit tests for it. It’s written in python using the amazing apistar framework. All of my external data so far is gathered using the requests library. The answer for this, turns out to requests-mock.