def test_three_legged_auth(self):
        yes_or_no = raw_input("Do you want to skip Twitter three legged auth test? (y/n):")
        if yes_or_no.lower() in ['y', 'yes']:
            return

        twitter_oauth_hook = OAuthHook()
        for header_auth in (True, False):
            # See https://dev.twitter.com/docs/auth/implementing-sign-twitter
            # Step 1: Obtaining a request token
            twitter_oauth_hook.header_auth = header_auth

            client = requests.session(hooks={'pre_request': twitter_oauth_hook})
            response = client.post('http://api.twitter.com/oauth/request_token', data={'oauth_callback': 'oob'})
            self.assertEqual(response.status_code, 200)
            response = parse_qs(response.content)
            self.assertTrue(response['oauth_token'])
            self.assertTrue(response['oauth_token_secret'])

            oauth_token = response['oauth_token']
            oauth_secret = response['oauth_token_secret']

            # Step 2: Redirecting the user
            print oauth_token[0] % "Go to https://api.twitter.com/oauth/authenticate?oauth_token=%s and sign in into the application, then enter your PIN"
            oauth_verifier = raw_input('Please enter your PIN:')

            # Step 3: Authenticate
            response = client.post('http://api.twitter.com/oauth/access_token', {'oauth_verifier': oauth_verifier, 'oauth_token': oauth_token[0]})
            response = parse_qs(response.content)
            self.assertTrue(response['oauth_token'])
            self.assertTrue(response['oauth_token_secret'])
dataset/ETHPy150Open maraujop/requests-oauth/tests/tests.py/TwitterOAuthTestSuite.test_three_legged_auth/swapped operands of `%`