o-nikolas commented on code in PR #33440:
URL: https://github.com/apache/airflow/pull/33440#discussion_r1297548126


##########
tests/providers/google/cloud/sensors/test_dataplex.py:
##########
@@ -144,3 +145,47 @@ def test_done(self, mock_hook):
         )
 
         assert result
+
+    def test_start_sensor_time(self):
+        sensor = DataplexDataQualityJobStatusSensor(
+            task_id=TASK_ID,
+            project_id=PROJECT_ID,
+            job_id=TEST_JOB_ID,
+            data_scan_id=TEST_DATA_SCAN_ID,
+            region=REGION,
+            api_version=API_VERSION,
+            gcp_conn_id=GCP_CONN_ID,
+            impersonation_chain=IMPERSONATION_CHAIN,
+            timeout=TIMEOUT,
+        )
+
+        assert sensor.start_sensor_time is None
+
+        duration_1 = sensor._duration()
+        duration_2 = sensor._duration()
+
+        assert bool(sensor.start_sensor_time)

Review Comment:
   The float by itself will be truthy (unless it's 0.0 of course, then it's 
falsey), no need to wrap in `bool`



-- 
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]

Reply via email to