Should use assertRaises.