Fixes to test.py