GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Cleaned up mocks · googleapis/python-aiplatform@b09cece

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • samples/model-builder
    • conftest.py
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎samples/model-builder/conftest.py‎

Copy file name to clipboardExpand all lines: samples/model-builder/conftest.py
+6-3Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ def mock_run_custom_training_job():
215215

216216
@pytest.fixture
217217
def mock_model():
218-
mock = MagicMock(aiplatform.models.Model)
218+
mock = MagicMock(aiplatform.Model)
219219
yield mock
220220

221221

@@ -231,11 +231,13 @@ def mock_batch_predict_model(mock_model):
231231
with patch.object(mock_model, "batch_predict") as mock:
232232
yield mock
233233

234+
234235
@pytest.fixture
235236
def mock_upload_model():
236237
with patch.object(aiplatform.Model, "upload") as mock:
237238
yield mock
238239

240+
239241
@pytest.fixture
240242
def mock_deploy_model(mock_model, mock_endpoint):
241243
with patch.object(mock_model, "deploy") as mock:
@@ -265,7 +267,7 @@ def mock_create_batch_prediction_job():
265267

266268
@pytest.fixture
267269
def mock_endpoint():
268-
mock = MagicMock(aiplatform.models.Endpoint)
270+
mock = MagicMock(aiplatform.Endpoint)
269271
yield mock
270272

271273

@@ -281,8 +283,9 @@ def mock_get_endpoint(mock_endpoint):
281283
mock_get_endpoint.return_value = mock_endpoint
282284
yield mock_get_endpoint
283285

286+
284287
@pytest.fixture
285288
def mock_endpoint_explain(mock_endpoint):
286289
with patch.object(mock_endpoint, "explain") as mock_endpoint_explain:
287290
mock_get_endpoint.return_value = mock_endpoint
288-
yield mock_endpoint_explain
291+
yield mock_endpoint_explain

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.