Mocking, Python, Pytest
Ok this is going to be a collection of notes to self. This post does a good job of summing up some mock patterns with PyTest. I then had to mock the Snyk client which depended on the Requests library. I chose not to mock the requests library but the methods in the snyk library. The thing was the method I mocked returned the “Response” object and I wanted to use the json() feature of that object/class to return the results.