test_user: Remove duplicate code.