def __getattr__(self, attr): # this attr is accessed during the initialization # of the MagicMock, so we cannot raise here if attr == "_mock_methods": return None raise util.AccessDenied()
def __getattr__(self, attr): raise util.AccessDenied()