예제 #1
0
    def test_send_to_subscribe(self):
        sub = self.subscriber1
        sender.sendto(sub, sub['C1'], 'C1', 'data_1')

        self.assertEqual(self.connect1.data, [
                         '["1_1","1_1"]',
                         '["1_1","1_1"]'])
        self.assertEqual(self.connect2.data, [])
예제 #2
0
 def test_send_to_list(self):
     sub = self.subscriber1
     sender.sendto(sub, [self.subscriber2], 'C1', 'data_2')
     self.assertEqual(self.connect1.data, [
                      '["1_2","1_2"]'])
     self.assertEqual(self.connect2.data, [])