'has_attr() checks for the presence of an attribute.
Please note note: has_attr() is different from
__in__. has_attr() checks the tag\'s attributes and __in__
checks the tag\'s chidlren.'

def test_has_attr(self):

    soup = self.soup("<foo    attr='bar'>")
    self.assertTrue(soup.foo.has_attr('attr'))
    self.assertFalse(soup.foo.has_attr('attr2'))
