change expectedFailure to using assertRaises

Signed-off-by: Kouhei Maeda <mkouhei@palmtb.net>