def test_unsubscribe(self):
    dispatcher.subscribe('cb1_sig', self.callback_1)
    dispatcher.publish('cb1_sig')
    self.assertEqual(self.cb1, 1)
    self.cb1 = 0
    dispatcher.unsubscribe('cb1_sig', self.callback_1)
    dispatcher.publish('cb1_sig')
    self.assertEqual(self.cb1, 0)
def test_unsubscribe(self):
    dispatcher.subscribe('cb1_sig', self.callback_1)
    dispatcher.publish('cb1_sig')
    self.assertEqual(self.cb1, 1)
    self.cb1 = 0
    dispatcher.unsubscribe('cb1_sig', self.callback_1)
    dispatcher.publish('cb1_sig')
    self.assertEqual(self.cb1, 0)