def test_put_etag_right_on_change(self):
        path = '%s?%s' % (reverse('lrs:agent_profile'), urllib.urlencode(self.testparams1))
        profile = {"test":"good - trying to put new profile w/ etag header","obj":{"agent":"test"}}
        thehash = hashlib.sha1('%s' % self.testprofile1).hexdigest() % '"%s"'
        response = self.client.put(path, profile, content_type=self.content_type, If_Match=thehash, Authorization=self.auth, X_Experience_API_Version=settings.XAPI_VERSION)
        self.assertEqual(response.status_code, 204)
        self.assertEqual(response.content, '')

        r = self.client.get(reverse('lrs:agent_profile'), self.testparams1, Authorization=self.auth, X_Experience_API_Version=settings.XAPI_VERSION)
        self.assertEqual(r.status_code, 200)
        robj = ast.literal_eval(r.content)
        self.assertEqual(robj['test'], profile['test'])
        self.assertEqual(robj['obj']['agent'], profile['obj']['agent'])
dataset/ETHPy150Open adlnet/ADL_LRS/lrs/tests/test_AgentProfile.py/AgentProfileTests.test_put_etag_right_on_change/swapped operands of `%`