fix python2.6 failure with assertRaises syntax

pass functiona and options rather than use as context