Use six.StringIO instead of StringIO.StringIO

to keep Python 3.x compatibility, use six.StringIO/BytesIO to
replace StringIO.StringIO

StringIO works for unicode
BytesIO works for bytes

Change-Id: I5e40809b2347d4dbe031ba92dac4848b044d3af6
Closes-Bug: #1280100
Replace assertEqual(None, *) with assertIsNone in tests

Replace assertEqual(None, *) with assertIsNone in tests to have
more clear messages in case of failure.

Change-Id: I2560aa559580fb068eb27174c9a7c8cd57e11b69
Merge "Use six.StringIO instead of StringIO.StringIO"