using assertRaise to catch the exception