Fix tests under Python 2.6

assertRaises is not a context manager under Py 2.6