title: Python's `unittest` lacks an `assertHasAttr` method, what should I use instead?
body: <p>Of the many, many assert methods in <a href="https://docs.python.org/3/library/unittest.html" rel="noreferrer">Python's standard <code>unittest</code> package</a>, <code>.assertHasAttr()</code> is curiously absent. While writing some unit tests I've run into a case in which I'd like to test for the presence of an attribute in an object instance.</p>
  
  <p>What's a safe/correct alternative for the missing <code>.assertHasAttr()</code> method?</p>