test.py updated test code