test_adx_4.py 516 B

12345678910111213
  1. def test_conn_missing_cluster(self):
  2. db.merge_conn(
  3. Connection(
  4. conn_id=ADX_TEST_CONN_ID,
  5. conn_type='azure_data_explorer',
  6. login='client_id',
  7. password='client secret',
  8. extra=json.dumps({}),
  9. )
  10. )
  11. with pytest.raises(AirflowException) as ctx:
  12. AzureDataExplorerHook(azure_data_explorer_conn_id=ADX_TEST_CONN_ID)
  13. assert 'Host connection option is required' in str(ctx.value)