harishkrao commented on a change in pull request #22104:
URL: https://github.com/apache/airflow/pull/22104#discussion_r825407008



##########
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:
       I just printed the dict entirely and saw that these are the only two 
values the `GoogleSheetsCreateSpreadsheetOperator`'s execute call returns. 
   The dict looks like this: `{'spreadsheetId': '1234567890', 'spreadsheetUrl': 
'https://example/sheets'}`. 




-- 
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-unsubscr...@airflow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to