jamielennox/requests-mock — pull request #4 by prmtl (2014-12-13 18:43:39+00:00)
Title: [WIP] Allow to decorate class with mock

Now it is possible to mock not only a function but also a class:

class TestClass(object)

def test_func_a(self, m):
m.register_uri('GET', 'http://test.com', text='data')
...

def test_func_b(self, m)
m.register_uri('GET', 'http://test.com', text='data')
...

This new behavior mimics behavior of `patch` from `mock` library.

I would like to get your feedback on this patch. If it's OK, I'll add a docs.