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 2022/03/13 06:27:41 UTC
[GitHub] [airflow] harishkrao commented on a change in pull request #22104: Issue 20453 - Fixes the test_http and test_sheets assert calls only
harishkrao commented on a change in pull request #22104:
URL: https://github.com/apache/airflow/pull/22104#discussion_r825394693
##########
File path: tests/providers/google/suite/operators/test_sheets.py
##########
@@ -39,12 +39,9 @@ def test_execute(self, mock_xcom, mock_hook):
op = GoogleSheetsCreateSpreadsheetOperator(
task_id="test_task", spreadsheet=spreadsheet, gcp_conn_id=GCP_CONN_ID
)
- op.execute(context)
+ op_execute_result = op.execute(context)
mock_hook.return_value.create_spreadsheet.assert_called_once_with(spreadsheet=spreadsheet)
- calls = [
- mock.call(context, "spreadsheet_id", SPREADSHEET_ID),
- mock.call(context, "spreadsheet_url", SPREADSHEET_URL),
- ]
- mock_xcom.has_calls(calls)
+ assert op_execute_result['spreadsheetId'] == '1234567890'
+ assert op_execute_result['spreadsheetUrl'] == 'https://example/sheets'
Review comment:
Thank you, I will write the entire dict's results and write more tests wherever appropriate.
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org