(self, item)
To make it really easy to add methods to a fake only as needed by real tests,
        this prints out any calls to methods that aren't defined, with a suggested
        template to use for the function, but without raising an error.
        That way when you run a test, you'll get a print out for all of the methods
        you need to overwrite all at once.
To make it really easy to add methods to a fake only as needed by real tests,
        this prints out any calls to methods that aren't defined, with a suggested
        template to use for the function, but without raising an error.
        That way when you run a test, you'll get a print out for all of the methods
        you need to overwrite all at once.
To make it really easy to add methods to a fake only as needed by real tests this prints out any calls to methods that aren t defined with a suggested template to use for the function but without raising an error . That way when you run a test you ll get a print out for all of the methods you need to overwrite all at once .
def __getattr__(self, item):
        """
        To make it really easy to add methods to a fake only as needed by real tests,
        this prints out any calls to methods that aren't defined, with a suggested
        template to use for the function, but without raising an error.
        That way when you run a test, you'll get a print out for all of the methods
        you need to overwrite all at once.

        """
        cls_name = self.__class__.__name__

        if item == '_all_docs':
            raise AttributeError('{} must define attribute _all_docs'.format(cls_name))
        elif item.startswith('_'):
            raise AttributeError("'{}' object has no attribute '{}'"
                                 .format(cls_name, item))
        else:
            def f(*args, **kwargs):
                logging.error(
                    ("You need to define {cls}.{fn}. Here's a start" + FILTER_TEMPLATE)
                    .format(cls=cls_name, fn=item, args=args, kwargs=kwargs)
                )
                return self
            return f
def __getattr__ ( self , item ) : cls_name = self . __class__ . __name__ if item == '_all_docs' : raise AttributeError ( '{} must define attribute _all_docs' . format ( cls_name ) ) elif item . startswith ( '_' ) : raise AttributeError ( "'{}' object has no attribute '{}'" . format ( cls_name , item ) ) else : def f ( * args , * * kwargs ) : logging . error ( ( "You need to define {cls}.{fn}. Here's a start" + FILTER_TEMPLATE ) . format ( cls = cls_name , fn = item , args = args , kwargs = kwargs ) ) return self return f