refactor: refactor test.py