Fix test broken under Python 2.7 unittest.

This is the same fix as was submitted in #86, just against the master branch.