Use self.assertRaises as context manager

Change-Id: I666396df89f11a560f1bcc1757c2aa67551d2631