def test_disconnect_from_removes_all(self): # Register first smokesignal.on(('foo', 'bar'), self.fn) assert smokesignal.responds_to(self.fn, 'foo') assert smokesignal.responds_to(self.fn, 'bar') # Remove it smokesignal.disconnect_from(self.fn, ('foo', 'bar')) assert not smokesignal.responds_to(self.fn, 'foo') assert not smokesignal.responds_to(self.fn, 'bar')
def test_disconnect_from_removes_only_one(self): # Register first smokesignal.on(('foo', 'bar'), self.callback) assert smokesignal.responds_to(self.callback, 'foo') assert smokesignal.responds_to(self.callback, 'bar') # Remove it smokesignal.disconnect_from(self.callback, 'foo') assert not smokesignal.responds_to(self.callback, 'foo') assert smokesignal.responds_to(self.callback, 'bar')
def test_disconnect_from_removes_all(self): # Register first smokesignal.on(('foo', 'bar'), self.callback) assert smokesignal.responds_to(self.callback, 'foo') assert smokesignal.responds_to(self.callback, 'bar') # Remove it smokesignal.disconnect_from(self.callback, ('foo', 'bar')) assert not smokesignal.responds_to(self.callback, 'foo') assert not smokesignal.responds_to(self.callback, 'bar')
def test_disconnect_from_removes_only_one(self): # Register first smokesignal.on(('foo', 'bar'), self.fn) assert smokesignal.responds_to(self.fn, 'foo') assert smokesignal.responds_to(self.fn, 'bar') # Remove it smokesignal.disconnect_from(self.fn, 'foo') assert not smokesignal.responds_to(self.fn, 'foo') assert smokesignal.responds_to(self.fn, 'bar')