Пример #1
0
 def test_online_delete_deployment_with_traffic_raise(
         self, mock_endpoint_operations: EndpointOperations, randstr: str,
         mock_aml_services: Mock) -> None:
     deployment_name = "blue"
     mock_aml_services.online_endpoints.get.return_value = OnlineEndpointPropertiesTrackedResource(
         name=randstr,
         properties=OnlineEndpointProperties(auth_mode="key",
                                             traffic_rules={
                                                 deployment_name: 1,
                                                 "red": 0
                                             }),
     )
     with pytest.raises(Exception):
         mock_endpoint_operations.delete(type=ONLINE_ENDPOINT_TYPE,
                                         name=randstr,
                                         deployment=deployment_name)
     mock_endpoint_operations._online_operation.get.assert_called_once()
Пример #2
0
 def test_batch_delete(self, mock_endpoint_operations: EndpointOperations,
                       randstr: str) -> None:
     mock_endpoint_operations.delete(type=BATCH_ENDPOINT_TYPE, name=randstr)
     mock_endpoint_operations._batch_operation.delete.assert_called_once()
Пример #3
0
 def test_online_delete(self, mock_endpoint_operations: EndpointOperations,
                        randstr: str) -> None:
     mock_endpoint_operations.delete(type=ONLINE_ENDPOINT_TYPE,
                                     name=randstr)
     mock_endpoint_operations._online_operation.delete.assert_called_once()