tests: Add setup and teardown to user_test.py.