def test_default_scope_multiple_requests(self):
        oauth_header_resource_params, access_token = self.oauth_handshake(scope=False)

        stmt = json.dumps({"verb":{"id": "http://example.com/verbs/passed","display": {"en-US":"passed"}},
            "object": {"id":"act:test_post"},"actor":{"objectType":"Agent", "mbox":"mailto:t@t.com"}})

        # from_token_and_callback takes a dictionary        
        post_param_list = oauth_header_resource_params.split(",")
        post_oauth_header_resource_params_dict = {}
        for p in post_param_list:
            item = p.split("=")
            post_oauth_header_resource_params_dict[str(item[0]).strip()] = str(item[1]).strip('"')
        
        # from_request ignores realm, must remove so not input to from_token_and_callback
        del post_oauth_header_resource_params_dict['OAuth realm']
        
        # Create oauth request and add signature
        post_oauth_request = oauth.Request.from_token_and_callback(access_token, http_method='POST',
            http_url=TEST_SERVER + '/XAPI/statements/', parameters=post_oauth_header_resource_params_dict)
        post_signature_method = oauth.SignatureMethod_HMAC_SHA1()
        post_signature = post_signature_method.sign(post_oauth_request, self.consumer, access_token)
        oauth_header_resource_params += ',oauth_signature="%s"' % post_signature  
        
        post = self.client.post(TEST_SERVER + '/XAPI/statements/', data=stmt, content_type="application/json",
            Authorization=oauth_header_resource_params, X_Experience_API_Version=settings.XAPI_VERSION)
        self.assertEqual(post.status_code, 200)        
        # ====================================================
        stmt2 = json.dumps({"verb":{"id": "http://example.com/verbs/failed","display": {"en-US":"failed"}},
            "object": {"id":"act:test_post"},"actor":{"objectType":"Agent", "mbox":"mailto:t@t.com"}})

        # Use same oauth headers, replace nonce
        post_oauth_header_resource_params_dict['oauth_nonce'] = 'post_differ_nonce'

        # Create oauth request and add signature
        post_oauth_request2 = oauth.Request.from_token_and_callback(access_token, http_method='POST',
            http_url=TEST_SERVER + '/XAPI/statements/', parameters=post_oauth_header_resource_params_dict)
        post_signature_method2 = oauth.SignatureMethod_HMAC_SHA1()
        post_signature2 = post_signature_method2.sign(post_oauth_request2, self.consumer, access_token)
        sig = oauth_header_resource_params.replace(post_signature % '"%s"', '"%s"' % post_signature2)
        new_oauth_headers = sig.replace('oauth_nonce="resource_nonce"','oauth_nonce="post_differ_nonce"') 

        resp = self.client.post(TEST_SERVER + '/XAPI/statements/', data=stmt2, content_type="application/json",
            Authorization=new_oauth_headers, X_Experience_API_Version=settings.XAPI_VERSION)
        self.assertEqual(resp.status_code, 200)
dataset/ETHPy150Open adlnet/ADL_LRS/lrs/tests/test_OAuth.py/OAuthTests.test_default_scope_multiple_requests/swapped operands of `%`