Fix oauth authorization test so it works correctly