-
Notifications
You must be signed in to change notification settings - Fork 13.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Best practice: Mock connections AttributeError: type object 'Connection' has no attribute 'get' #39475
Comments
Thanks for opening your first issue here! Be sure to follow the issue template! If you are willing to raise PR to address this issue please do so, no need to wait for approval. |
I assume this one https://airflow.apache.org/docs/apache-airflow/2.1.2/_api/airflow/hooks/base/index.html#airflow.hooks.base.BaseHook.get_connection should be used |
@iamtodor , I think, you can use |
@rawwar yup, this approach could also be used. I think yours is better, is that right? |
Yeah, I think |
What do you see as an issue?
Per paragraph https://airflow.apache.org/docs/apache-airflow/2.8.2/best-practices.html#mocking-variables-and-connections
The given example
raises an error:
Solving the problem
Update the doc
Anything else
No response
Are you willing to submit PR?
Code of Conduct
The text was updated successfully, but these errors were encountered: