You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2019/08/19 07:59:39 UTC
[GitHub] [airflow] ashb commented on issue #5841: [AIRFLOW-3705] Fix
PostgresHook get_conn to use conn_name_attr
ashb commented on issue #5841: [AIRFLOW-3705] Fix PostgresHook get_conn to use conn_name_attr
URL: https://github.com/apache/airflow/pull/5841#issuecomment-522457696
Can you explain exactly why this is needed? Is there a reason you can't set postgres_conn_id inside subclass's constructor? Something like:
```python
class UnitTestPostgresHook(PostgresHook):
def __int__(self, test_conn_id, **kwargs)
super().__init__(postgres_conn_id=test_conn_id, **kwargs)
```
That way no change is needed to airflow.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services