Resolve #9223 Fix test for python 2.6

* trivial test refactor to allow for python 2.6 compat
Corrected indentation
Merge pull request #9224 from drawks/iss9223

Resolve #9223 Fix test for python 2.6