fix test.py issues