Bug 901985 - Fix TypeError in rarely encountered if branch in testbase.py, r=aki