@@ -352,25 +352,7 @@ def setup_method(self):
352
352
def teardown_method (self ):
353
353
initializer .global_pool .shutdown (wait = True )
354
354
355
- def test_prepare_create (
356
- self ,
357
- cloud_storage_create_bucket_mock ,
358
- tarfile_open_mock ,
359
- cloudpickle_dump_mock ,
360
- ):
361
- _reasoning_engines ._prepare_create (
362
- reasoning_engine = self .test_app ,
363
- requirements = _TEST_REASONING_ENGINE_REQUIREMENTS ,
364
- extra_packages = [],
365
- project = _TEST_PROJECT ,
366
- location = _TEST_LOCATION ,
367
- staging_bucket = _TEST_STAGING_BUCKET ,
368
- gcs_dir_name = _TEST_GCS_DIR_NAME ,
369
- )
370
- cloudpickle_dump_mock .assert_called () # when preparing object.pkl
371
- tarfile_open_mock .assert_called () # when preparing extra_packages
372
-
373
- def test_prepare_update_with_unspecified_extra_packages (
355
+ def test_prepare_with_unspecified_extra_packages (
374
356
self ,
375
357
cloud_storage_create_bucket_mock ,
376
358
cloudpickle_dump_mock ,
@@ -379,7 +361,7 @@ def test_prepare_update_with_unspecified_extra_packages(
379
361
_reasoning_engines ,
380
362
"_upload_extra_packages" ,
381
363
) as upload_extra_packages_mock :
382
- _reasoning_engines ._prepare_update (
364
+ _reasoning_engines ._prepare (
383
365
reasoning_engine = self .test_app ,
384
366
requirements = _TEST_REASONING_ENGINE_REQUIREMENTS ,
385
367
extra_packages = None ,
@@ -390,7 +372,7 @@ def test_prepare_update_with_unspecified_extra_packages(
390
372
)
391
373
upload_extra_packages_mock .assert_not_called ()
392
374
393
- def test_prepare_update_with_empty_extra_packages (
375
+ def test_prepare_with_empty_extra_packages (
394
376
self ,
395
377
cloud_storage_create_bucket_mock ,
396
378
cloudpickle_dump_mock ,
@@ -399,7 +381,7 @@ def test_prepare_update_with_empty_extra_packages(
399
381
_reasoning_engines ,
400
382
"_upload_extra_packages" ,
401
383
) as upload_extra_packages_mock :
402
- _reasoning_engines ._prepare_update (
384
+ _reasoning_engines ._prepare (
403
385
reasoning_engine = self .test_app ,
404
386
requirements = _TEST_REASONING_ENGINE_REQUIREMENTS ,
405
387
extra_packages = [],
@@ -429,6 +411,7 @@ def test_create_reasoning_engine(
429
411
self .test_app ,
430
412
display_name = _TEST_REASONING_ENGINE_DISPLAY_NAME ,
431
413
requirements = _TEST_REASONING_ENGINE_REQUIREMENTS ,
414
+ extra_packages = [_TEST_REASONING_ENGINE_EXTRA_PACKAGE_PATH ],
432
415
)
433
416
# Manually set _gca_resource here to prevent the mocks from propagating.
434
417
test_reasoning_engine ._gca_resource = _TEST_REASONING_ENGINE_OBJ
@@ -494,6 +477,7 @@ def test_create_reasoning_engine_requirements_from_file(
494
477
self .test_app ,
495
478
display_name = _TEST_REASONING_ENGINE_DISPLAY_NAME ,
496
479
requirements = "requirements.txt" ,
480
+ extra_packages = [_TEST_REASONING_ENGINE_EXTRA_PACKAGE_PATH ],
497
481
)
498
482
mock_file .assert_called_with ("requirements.txt" )
499
483
# Manually set _gca_resource here to prevent the mocks from propagating.
@@ -668,6 +652,7 @@ def test_delete_after_create_reasoning_engine(
668
652
self .test_app ,
669
653
display_name = _TEST_REASONING_ENGINE_DISPLAY_NAME ,
670
654
requirements = _TEST_REASONING_ENGINE_REQUIREMENTS ,
655
+ extra_packages = [_TEST_REASONING_ENGINE_EXTRA_PACKAGE_PATH ],
671
656
)
672
657
# Manually set _gca_resource here to prevent the mocks from propagating.
673
658
test_reasoning_engine ._gca_resource = _TEST_REASONING_ENGINE_OBJ
0 commit comments