コード例 #1
0
 def poke(self, context):
     self.log.info(
         'Poking for blob: %s\nin wasb://%s', self.blob_name, self.container_name
     )
     hook = WasbHook(wasb_conn_id=self.wasb_conn_id)
     return hook.check_for_blob(self.container_name, self.blob_name,
                                **self.check_options)
コード例 #2
0
 def poke(self, context):
     self.log.info(
         'Poking for blob: %s\nin wasb://%s', self.blob_name, self.container_name
     )
     hook = WasbHook(wasb_conn_id=self.wasb_conn_id)
     return hook.check_for_blob(self.container_name, self.blob_name,
                                **self.check_options)
コード例 #3
0
ファイル: test_wasb_hook.py プロジェクト: Nextdoor/airflow
 def test_check_for_blob(self, mock_service):
     mock_instance = mock_service.return_value
     mock_instance.exists.return_value = True
     hook = WasbHook(wasb_conn_id='wasb_test_sas_token')
     self.assertTrue(hook.check_for_blob('container', 'blob', timeout=3))
     mock_instance.exists.assert_called_once_with(
         'container', 'blob', timeout=3
     )
コード例 #4
0
 def poke(self, context):
     logging.info(
         'Poking for blob: {self.blob_name}\n'
         'in wasb://{self.container_name}'.format(**locals())
     )
     hook = WasbHook(wasb_conn_id=self.wasb_conn_id)
     return hook.check_for_blob(self.container_name, self.blob_name,
                                **self.check_options)
コード例 #5
0
 def test_check_for_blob(self, mock_service):
     mock_instance = mock_service.return_value
     mock_instance.exists.return_value = True
     hook = WasbHook(wasb_conn_id='wasb_test_sas_token')
     self.assertTrue(hook.check_for_blob('container', 'blob', timeout=3))
     mock_instance.exists.assert_called_once_with(
         'container', 'blob', timeout=3
     )
コード例 #6
0
ファイル: test_wasb_hook.py プロジェクト: Nextdoor/airflow
 def test_check_for_blob_empty(self, mock_service):
     mock_service.return_value.exists.return_value = False
     hook = WasbHook(wasb_conn_id='wasb_test_sas_token')
     self.assertFalse(hook.check_for_blob('container', 'blob'))
コード例 #7
0
 def test_check_for_blob_empty(self, mock_service):
     mock_service.return_value.exists.return_value = False
     hook = WasbHook(wasb_conn_id='wasb_test_sas_token')
     self.assertFalse(hook.check_for_blob('container', 'blob'))