test url encoding and fix pep8s
Fix urlencoding tests
Use get_user_repository for get correct user repo