Esempio n. 1
0
 def test_basic_interaction(self):
     self.assertIsNone(state_handler.get_checksum(0))
     checksum = "397fc6229a59429ee114441b780fe7a2"
     state_handler.set_checksum(0, checksum)
     self.assertEqual(state_handler.get_checksum(0), checksum)
     state_handler.clear_checksum(0)
     self.assertIsNone(state_handler.get_checksum(0))
Esempio n. 2
0
 def test_basic_interaction(self):
     self.assertIsNone(state_handler.get_checksum(0))
     checksum = '397fc6229a59429ee114441b780fe7a2'
     state_handler.set_checksum(0, checksum)
     self.assertEqual(state_handler.get_checksum(0), checksum)
     state_handler.clear_checksum(0)
     self.assertIsNone(state_handler.get_checksum(0))
Esempio n. 3
0
 def test_checksum_persistence(self):
     """Make sure checksums are shared between threads."""
     checksum = "397fc6229a59429ee114441b780fe7a2"
     state_handler.set_checksum(0, checksum)
     getter = ChecksumGetter(0)
     getter.start()
     getter.join()
     self.assertEqual(getter.checksum, checksum)
     state_handler.clear_checksum(0)
     getter = ChecksumGetter(0)
     getter.start()
     getter.join()
     self.assertIsNone(getter.checksum)
Esempio n. 4
0
 def test_checksum_persistence(self):
     """Make sure checksums are shared between threads."""
     checksum = '397fc6229a59429ee114441b780fe7a2'
     state_handler.set_checksum(0, checksum)
     getter = ChecksumGetter(0)
     getter.start()
     getter.join()
     self.assertEqual(getter.checksum, checksum)
     state_handler.clear_checksum(0)
     getter = ChecksumGetter(0)
     getter.start()
     getter.join()
     self.assertIsNone(getter.checksum)