ashb commented on a change in pull request #6396: [AIRFLOW-5726] Delete table
as file name in RedshiftToS3Transfer
URL: https://github.com/apache/airflow/pull/6396#discussion_r346257108
##########
File path: tests/operators/test_redshift_to_s3_operator.py
##########
@@ -51,23 +52,25 @@ def test_execute(self, mock_run, mock_session):
redshift_conn_id="redshift_conn_id",
aws_conn_id="aws_conn_id",
task_id="task_id",
+ table_as_file_name=table_as_file_name,
dag=None
).execute(None)
unload_options = '\n\t\t\t'.join(unload_options)
+ s3_key = '{}/{}_'.format(s3_key, table) if table_as_file_name else
s3_key
Review comment:
This isn't needed in the test - we call it explicitly with one value so we
should have this as
```suggestion
s3_key = '{}/{}_'.format(s3_key, table)
```
Also you need to add a test covering `table_as_file_name=False`
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services