def test_on_create(self): self._call_count = 0 def _call_back(image): self._call_count += 1 ImageCreateEvent.connect(_call_back) image = self.create_image() image.on_create() self.assertNotEqual(self._call_count, 0)
def on_create(self): ImageCreateEvent.emit(self)