shahar1 commented on PR #41561: URL: https://github.com/apache/airflow/pull/41561#issuecomment-2361433287
> @shahar1 sir and @vincbeck sir I've added unit test cases and done my best to cover the expected behaviors. As I'm a beginner, I'd greatly appreciate your feedback and any suggestions for improvement but i am stuck in resolving these errors please sir can you guide me to resolve these issue Hello, here's some guidance: 1. In `test_create_job_flow_deferrable` you need to set `self.operator.wait_for_completion = True` (otherwise it won't pass the first if). 1. In `test_deferrable_and_wait_for_completion`, when you call the `assert` statement you create a new instance of `EmrCreateJobFlowTrigger` - which will always be different than the instance that is created by the original function. I'd suggest to mock `EmrCreateJobFlowTrigger` (let's call it `mock_trigger`) and then you could assert on `trigger=mock_trigger.return_value`. You could also create a separate assertion for the attributes `mock_trigger` to ensure that all the parameters are as expected. Please let me know if you encounter any issues. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
