'Test addition and removal of a bootstrap event handler.'

def test_addAndRemoveBootstrap(self):

    called = []
    def cb(data):
        called.append(data)
    self.factory.addBootstrap('//event/myevent', cb)
    self.factory.removeBootstrap('//event/myevent', cb)
    dispatcher = DummyProtocol()
    self.factory.installBootstraps(dispatcher)
    dispatcher.dispatch(None, '//event/myevent')
    self.assertFalse(called)
