SyntaxFix
Write A Post
Hire A Developer
Questions
Here is what worked for me:
import mock @mock.patch('requests.get', mock.Mock(side_effect = lambda k:{'aurl': 'a response', 'burl' : 'b response'}.get(k, 'unhandled request %s'%k)))