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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]