def test_invalid_dispatcher(self): sample = SampleDispatcherAware() sample.dispatcher = 'test'
def test_is_aware(self): sample = SampleDispatcherAware() assert isinstance(sample, EventDispatcherAware) assert isinstance(sample.dispatcher, EventDispatcher)
def test_invalid_dispatcher(self): with raises(TypeError): sample = SampleDispatcherAware() sample.dispatcher = 'test'