Test that the object obj has (or has not) an attribute name.
unittest/TestCase.assertHasAttr
TestCase.assertHasAttr