fixed issues with assertRaises in non-python2.7+ systems