def test_get_agent_since_tz(self):
        prof_id = "http://oldprofile/time"
        updated = "2012-06-12:T12:00:00Z"
        params = {"profileId": prof_id, "agent": self.testagent}
        path = '%s?%s' % (reverse('lrs:agent_profile'), urllib.urlencode(params))

        profile = {"test2":"agent profile since time: %s" % updated,"obj":{"agent":"test"}}
        response = self.client.put(path, profile, content_type=self.content_type, updated=updated, Authorization=self.auth, X_Experience_API_Version=settings.XAPI_VERSION)

        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['test2'], profile['test2'])
        self.assertEqual(robj['obj']['agent'], profile['obj']['agent'])

        prof_id2 = "http://newprofile/timezone"
        updated2 =  "2012-07-01T08:30:00-04:00"

        params2 = {"profileId": prof_id2, "agent": self.testagent}
        path2 = '%s?%s' % (reverse('lrs:agent_profile'), urllib.urlencode(params2))

        profile2 = {"test3":"agent profile since time: %s" % updated2,"obj":{"agent":"test"}}
        response = self.client.put(path2, profile2, content_type=self.content_type, updated=updated2, Authorization=self.auth, X_Experience_API_Version=settings.XAPI_VERSION)
        self.assertEqual(response.status_code, 204)

        r2 = self.client.get(reverse('lrs:agent_profile'), params2, Authorization=self.auth, X_Experience_API_Version=settings.XAPI_VERSION)
        self.assertEqual(r2.status_code, 200)
        robj2 = ast.literal_eval(r2.content)
        self.assertEqual(robj2['test3'], profile2['test3'])
        self.assertEqual(robj2['obj']['agent'], profile2['obj']['agent'])

        since = "2012-07-01T12:00:00Z"

        par = {"agent": self.testagent, "since":since}
        r = self.client.get(reverse('lrs:agent_profile'), par, Authorization=self.auth, X_Experience_API_Version=settings.XAPI_VERSION)

        self.assertNotIn(prof_id, r.content)
        self.assertIn(prof_id2, r.content)

        self.client.delete(reverse('lrs:agent_profile'), params, Authorization=self.auth, X_Experience_API_Version=settings.XAPI_VERSION)
        self.client.delete(reverse('lrs:agent_profile'), params2, Authorization=self.auth, X_Experience_API_Version=settings.XAPI_VERSION)
dataset/ETHPy150Open adlnet/ADL_LRS/lrs/tests/test_AgentProfile.py/AgentProfileTests.test_get_agent_since_tz/original