You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by el...@apache.org on 2023/01/10 05:53:13 UTC

[airflow] branch main updated: Fix parameters not passed in BigQueryColumnCheckOperator test (#28801)

This is an automated email from the ASF dual-hosted git repository.

eladkal pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new 07a17bafa1 Fix parameters not passed in BigQueryColumnCheckOperator test (#28801)
07a17bafa1 is described below

commit 07a17bafa1c3de86a993ee035f91b3bbd284e83b
Author: Victor Chiapaikeo <vc...@gmail.com>
AuthorDate: Tue Jan 10 00:53:03 2023 -0500

    Fix parameters not passed in BigQueryColumnCheckOperator test (#28801)
---
 tests/providers/google/cloud/operators/test_bigquery.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/providers/google/cloud/operators/test_bigquery.py b/tests/providers/google/cloud/operators/test_bigquery.py
index d699d6cedb..5eab8807a5 100644
--- a/tests/providers/google/cloud/operators/test_bigquery.py
+++ b/tests/providers/google/cloud/operators/test_bigquery.py
@@ -1725,7 +1725,7 @@ def test_bigquery_column_check_operator_succeeds(mock_job, mock_hook, check_type
 @mock.patch("airflow.providers.google.cloud.hooks.bigquery.BigQueryJob")
 def test_bigquery_column_check_operator_fails(mock_job, mock_hook, check_type, check_value, check_result):
     mock_job.result.return_value.to_dataframe.return_value = pd.DataFrame(
-        {"col_name": ["col1"], "check_type": ["min"], "check_result": [1]}
+        {"col_name": ["col1"], "check_type": ["min"], "check_result": [check_result]}
     )
     mock_hook.return_value.insert_job.return_value = mock_job
 
@@ -1734,7 +1734,7 @@ def test_bigquery_column_check_operator_fails(mock_job, mock_hook, check_type, c
         table=TEST_TABLE_ID,
         use_legacy_sql=False,
         column_mapping={
-            "col1": {"min": {"equal_to": 0}},
+            "col1": {"min": {check_type: check_value}},
         },
     )
     with pytest.raises(AirflowException):