def __getattribute__(self, attr):
        """
        The Mock HDFS simply calls check_failover, regardless of the filesystem operator invoked.
        """

        def op(*args, **kwargs):
            """ Mock operator """
            return self._check_failovers()

        # Of course, exclude any protected/private method calls
        if not attr.startswith('_'):
            return op
        return object.__getattribute__(self, attr)

        The Mock HDFS simply calls check_failover, regardless of the filesystem operator invoked.
        
petastorm/hdfs/tests/test_hdfs_namenode.py