uranusjr commented on a change in pull request #18927:
URL: https://github.com/apache/airflow/pull/18927#discussion_r736896315
##########
File path: tests/providers/google/cloud/transfers/test_cassandra_to_gcs.py
##########
@@ -48,6 +49,10 @@ def test_execute(self, mock_hook, mock_upload,
mock_tempfile):
)
operator.execute(None)
mock_hook.return_value.get_conn.assert_called_once_with()
+
mock_hook.return_value.get_conn.return_value.execute.assert_called_once_with(
+ query=cql,
Review comment:
It's actually preferred to repeat the string value here to make sure the
string is passed correctly. The plainer the test code is, the easier it can
catch bugs in the real code (instead of *bugs in tests*)
https://evgenii.com/blog/code-duplication-in-unit-tests/
--
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]