def test_poke(self, mock_msg_to_dict, mock_hook): op = BigQueryDataTransferServiceTransferRunSensor( transfer_config_id=TRANSFER_CONFIG_ID, run_id=RUN_ID, task_id="id", project_id=PROJECT_ID, expected_statuses={"success"}, ) op.poke(None) mock_hook.return_value.get_transfer_run.assert_called_once_with( transfer_config_id=TRANSFER_CONFIG_ID, run_id=RUN_ID, project_id=PROJECT_ID, metadata=None, retry=None, timeout=None, )
def test_poke_returns_true(self, mock_hook): op = BigQueryDataTransferServiceTransferRunSensor( transfer_config_id=TRANSFER_CONFIG_ID, run_id=RUN_ID, task_id="id", project_id=PROJECT_ID, expected_statuses={"SUCCEEDED"}, ) result = op.poke({}) self.assertEqual(result, True) mock_hook.return_value.get_transfer_run.assert_called_once_with( transfer_config_id=TRANSFER_CONFIG_ID, run_id=RUN_ID, project_id=PROJECT_ID, metadata=None, retry=None, timeout=None, )