jgorset/facepy — pull request #45 by bulkan (2012-06-14 01:58:23+00:00)
Title: Moved the inner Exception classes of GraphAPI into exceptions.py

I was having trouble mocking out GraphAPI via the following code

def test_my_view(self):
with patch('facepy.graphy_api.GraphAPI) as ga:
....

I would get the following stack track trace

../lib/python2.6/site-packages/facepy/graph_api.py", line 275, in __init__
super(GraphAPI.FacebookError, self).__init__(message)
TypeError: super() argument 1 must be type, not MagicMock

This way I can mock out GraphAPI