Exemple #1
0
 def testResetNotEmptySid(self):
     register(1, "sid-1")
     register(2, "sid-1")
     resp = query("sid-1")
     self.assertEqual(len(resp["data"]), 2)
     resetSid("sid-1")
     resp = query("sid-1")
     self.assertEqual(len(resp["data"]), 0)
 def testResetPersistence(self):
     register(1, "sid-1")
     register(2, "sid-2")
     resetSid("sid-1")
     resp = query("sid-1")
     self.assertEqual(len(resp["data"]), 0)
     resp = query("sid-2")
     self.assertEqual(len(resp["data"]), 1)
     exitServer()
     time.sleep(0.5)
     resp = query("sid-1")
     self.assertEqual(len(resp["data"]), 0)
     resp = query("sid-2")
     self.assertEqual(len(resp["data"]), 1)
Exemple #3
0
 def testResetExistSidResponse(self):
     register(1, "sid-1")
     resp = resetSid("sid-1")
     self.assertEqual(resp["success"], "true")
Exemple #4
0
 def setUp(self):
     resetSid("sid-1")
Exemple #5
0
 def testResetNotExistSid(self):
     resp = resetSid("sid-1234")
     self.assertEqual(resp["success"], "true")