Resolve #9223 Fix test for python 2.6

* trivial test refactor to allow for python 2.6 compat that resolves #9223