py26 compat

"Changed in version 2.7: Added the ability to use assertRaises() as a
context manager."
http://docs.python.org/2/library/unittest.html

Also assertIn doesn't seem to be available either.  didn't look too hard
but maybe it's because we're using the mox test case?

Change-Id: Ib875fcd327a2dd54e85219ccc4bb37e0550e4b38
pep8

Change-Id: I56558e195d27db2cf009956a1b26ca0d2ef97cb8
Fix contrib

Change-Id: I144d082388acf28fb9acd3e19152dc9abee6f6b9