Example #1
0
 def test_noise_packets(self):
     self.assertIsNone(
         noise_loop(self.queues, self.contact_list, unittest=True))
     packet, log_messages, log_as_ph = self.queues[
         TM_NOISE_PACKET_QUEUE].get()
     self.assertEqual(packet, PLACEHOLDER_DATA)
     self.assertTrue(log_messages)
     self.assertTrue(log_as_ph)
Example #2
0
 def test_noise_commands(self):
     self.assertIsNone(noise_loop(self.queues, unittest=True))
     packet = self.queues[TM_NOISE_COMMAND_QUEUE].get()
     self.assertEqual(packet, C_N_HEADER + bytes(PADDING_LENGTH))