use assertRaises instead