Код: Выделить всё
from google.cloud.aiplatform import Endpoint
def my_function(existing_endpoint: Endpoint)-> str:
return existing_endpoint._gca_resource.name
Код: Выделить всё
def test_my_function_should_work():
## something to simulate an existing endpoint
assert my_function(fake_endpoint) == "projects/12345/locations/europe-west1/endpoints/12345"