Lambda approach for assertRaises due to 2.6