def test_delete(self):
        prof_id = "http://deleteme"
        params = {"profileId": prof_id, "agent": self.testagent}
        path = '%s?%s' % (reverse('lrs:agent_profile'), urllib.urlencode(params))
        profile = {"test":"delete profile","obj":{"agent":"test"}}
        response = self.client.put(path, profile, content_type=self.content_type, Authorization=self.auth, X_Experience_API_Version=settings.XAPI_VERSION)
        self.assertEqual(response.status_code, 204)

        r = self.client.get(reverse('lrs:agent_profile'), params, 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'])

        r = self.client.delete(reverse('lrs:agent_profile'), params, Authorization=self.auth, X_Experience_API_Version=settings.XAPI_VERSION)
        self.assertEqual(r.status_code, 204)

        r = self.client.get(reverse('lrs:agent_profile'), params, Authorization=self.auth, X_Experience_API_Version=settings.XAPI_VERSION)
        self.assertEqual(r.status_code, 404)
dataset/ETHPy150Open adlnet/ADL_LRS/lrs/tests/test_AgentProfile.py/AgentProfileTests.test_delete/original