def test_delete_none_workflow(self):
        with mock.patch(
                'ai_flow.test.scheduler.test_scheduling_service.MockScheduler'
        ) as mockScheduler:
            instance = mockScheduler.return_value
            self.server.scheduling_service._scheduler = instance

            instance.delete_workflow.return_value = None
            client = SchedulingClient("localhost:{}".format(_PORT))
            with self.assertRaises(Exception) as context:
                workflow = client.delete_workflow(
                    namespace='namespace', workflow_name='test_workflow')
    def test_delete_workflow(self):
        with mock.patch(
                'ai_flow.test.scheduler.test_scheduling_service.MockScheduler'
        ) as mockScheduler:
            instance = mockScheduler.return_value
            self.server.scheduling_service._scheduler = instance

            instance.delete_workflow.return_value = WorkflowInfo(
                workflow_name='test_workflow')
            client = SchedulingClient("localhost:{}".format(_PORT))
            workflow = client.delete_workflow(namespace='namespace',
                                              workflow_name='test_workflow')
            self.assertTrue('test_workflow', workflow.name)