def METHOD_NAME(self):
    class A(object):
        def __init__(self):
            self.a = 1
            self.b = 2
        def __getattribute__(self, name):
            if name=="a":
                raise AttributeError
            return object.__getattribute__(self, name)
    a = A()
    adict = wildcard.dict_dir(a)
    assert "a" not in adict # change to assertNotIn method in >= 2.7
    self.assertEqual(adict["b"], 2)