test_azure_container_instance_1.py 788 B

1234567891011121314151617
  1. def setUp(self):
  2. db.merge_conn(
  3. Connection(
  4. conn_id='azure_container_instance_test',
  5. conn_type='azure_container_instances',
  6. login='login',
  7. password='key',
  8. extra=json.dumps({'tenantId': 'tenant_id', 'subscriptionId': 'subscription_id'}),
  9. )
  10. )
  11. self.resources = ResourceRequirements(requests=ResourceRequests(memory_in_gb='4', cpu='1'))
  12. with patch(
  13. 'azure.common.credentials.ServicePrincipalCredentials.__init__', autospec=True, return_value=None
  14. ):
  15. with patch('azure.mgmt.containerinstance.ContainerInstanceManagementClient'):
  16. self.hook = AzureContainerInstanceHook(conn_id='azure_container_instance_test')