Fix tests

Tests passing in all supported python versions (>= 2.5)