def test_unsubscribe_all_for_signal(self):
    dispatcher.subscribe('cb1_sig', self.callback_1)
    dispatcher.subscribe('cb1_sig', self.callback_2)
    dispatcher.subscribe('cb3_sig', self.callback_34)
    dispatcher.subscribe('cb3_sig', self.callback_56)
    dispatcher.unsubscribe_all('cb1_sig')
    dispatcher.publish('cb1_sig')
    dispatcher.publish('cb3_sig')
    self.assertEqual(self.cb1, 0)
    self.assertEqual(self.cb2, 0)
    self.assertEqual(self.cb3, 3)
    self.assertEqual(self.cb4, 4)
    self.assertEqual(self.cb5, 5)
    self.assertEqual(self.cb6, 6)
def test_unsubscribe_all_for_signal(self):
    dispatcher.subscribe('cb1_sig', self.callback_1)
    dispatcher.subscribe('cb1_sig', self.callback_2)
    dispatcher.subscribe('cb3_sig', self.callback_34)
    dispatcher.subscribe('cb3_sig', self.callback_56)
    dispatcher.unsubscribe_all('cb1_sig')
    dispatcher.publish('cb1_sig')
    dispatcher.publish('cb3_sig')
    self.assertEqual(self.cb1, 0)
    self.assertEqual(self.cb2, 0)
    self.assertEqual(self.cb3, 3)
    self.assertEqual(self.cb4, 4)
    self.assertEqual(self.cb5, 5)
    self.assertEqual(self.cb6, 6)