Refactor test_users. Rename functions at users.py