uranusjr commented on code in PR #23025:
URL: https://github.com/apache/airflow/pull/23025#discussion_r851129374
##########
tests/providers/google/cloud/sensors/test_looker.py:
##########
@@ -105,3 +105,15 @@ def test_cancelled(self, mock_hook):
# assert hook.pdt_build_status called once
mock_hook.return_value.pdt_build_status.assert_called_once_with(materialization_id=TEST_JOB_ID)
+
+ def test_empty_materialization_id(self):
+
+ # run task in mock context
+ sensor = LookerCheckPdtBuildSensor(
+ task_id=TASK_ID,
+ looker_conn_id=LOOKER_CONN_ID,
+ materialization_id="",
+ )
+
+ with pytest.raises(AirflowException, match="Invalid
`materialization_id`"):
Review Comment:
```suggestion
with pytest.raises(AirflowException, match="^Invalid
`materialization_id`$"):
```
--
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]