

def test_register_handler_is_none(self):
    a_task = MyTask()
    self.assertRaises(ValueError, a_task.notifier.register, task.EVENT_UPDATE_PROGRESS, None)
    self.assertEqual(0, len(a_task.notifier))

dataset/ETHPy150Open openstack/taskflow/taskflow/tests/unit/test_task.py TaskTest.test_register_handler_is_none/original