REF: use assertRaises context manager.

We're actually already depending on unittest2, so better use it.