Add validation tests for GenAIGenerateContentOperator#61262
Add validation tests for GenAIGenerateContentOperator#61262KL-2300032590 wants to merge 6 commits into
Conversation
shahar1
left a comment
There was a problem hiding this comment.
Good start!
Personally I don't find the tests you've implemented too practical, as ususally the type hints help us with figuring out such discrepancies (you could retain the tests though, they're not harmful 🙂).
Could you please try to test the execute method for the case where all required parameters are given?
Try to look at unit tests of other providers and learn how mocking works.
Please let me know if you need some direction.
shahar1
left a comment
There was a problem hiding this comment.
CI seems to fail now :(
Please let me know if you need some guidance.
@shahar1, |
Hey, I'd like to let you know that I've made a mistake and the tests which I thought were missing, actually exist in this file: I also overlooked that the test file you proposed was in the wrong path (it should be in However, you may still use this PR to try and test the exceptions raised in the current source file and currently not tested, for example: Try to look at the current test file, as well as others - and then you could try to utilize this PR for working on the exceptions. |
Hi @shahar1, Thanks for the clarification — that makes sense now. I understand that the validation tests already exist and that the confusion was partly due to the test path. I’m fine with repurposing this PR to focus only on currently untested exception paths in the GenAI operators (e.g. explicit AirflowExceptions). Appreciate the guidance. |
|
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 5 days if no further activity occurs. Thank you for your contributions. |
This PR adds validation-focused unit tests for
GenAIGenerateContentOperatorto ensure the operator fails fast when required parameters are missing.
This work contributes to #61261.
Notes: