Rewrite tests to use assertRaises

unittest.expectedFailure does not exist in Python 2.6