More unittest fixes

Another bunch of unittest fixes that make them all pass on a python 2.4 system.