@@ -618,25 +618,6 @@ def test_ensure_bqstorage_client_creating_new_instance(self):
618
618
client_info = mock .sentinel .client_info ,
619
619
)
620
620
621
- def test_ensure_bqstorage_client_obsolete_dependency (self ):
622
- from google .cloud .bigquery .exceptions import LegacyBigQueryStorageError
623
-
624
- creds = _make_credentials ()
625
- client = self ._make_one (project = self .PROJECT , credentials = creds )
626
-
627
- patcher = mock .patch (
628
- "google.cloud.bigquery.client.BQ_STORAGE_VERSIONS.verify_version" ,
629
- side_effect = LegacyBigQueryStorageError ("BQ Storage too old" ),
630
- )
631
- with patcher , warnings .catch_warnings (record = True ) as warned :
632
- bqstorage_client = client ._ensure_bqstorage_client ()
633
-
634
- self .assertIsNone (bqstorage_client )
635
- matching_warnings = [
636
- warning for warning in warned if "BQ Storage too old" in str (warning )
637
- ]
638
- assert matching_warnings , "Obsolete dependency warning not raised."
639
-
640
621
def test_ensure_bqstorage_client_existing_client_check_passes (self ):
641
622
creds = _make_credentials ()
642
623
client = self ._make_one (project = self .PROJECT , credentials = creds )
@@ -648,26 +629,6 @@ def test_ensure_bqstorage_client_existing_client_check_passes(self):
648
629
649
630
self .assertIs (bqstorage_client , mock_storage_client )
650
631
651
- def test_ensure_bqstorage_client_existing_client_check_fails (self ):
652
- from google .cloud .bigquery .exceptions import LegacyBigQueryStorageError
653
-
654
- creds = _make_credentials ()
655
- client = self ._make_one (project = self .PROJECT , credentials = creds )
656
- mock_storage_client = mock .sentinel .mock_storage_client
657
-
658
- patcher = mock .patch (
659
- "google.cloud.bigquery.client.BQ_STORAGE_VERSIONS.verify_version" ,
660
- side_effect = LegacyBigQueryStorageError ("BQ Storage too old" ),
661
- )
662
- with patcher , warnings .catch_warnings (record = True ) as warned :
663
- bqstorage_client = client ._ensure_bqstorage_client (mock_storage_client )
664
-
665
- self .assertIsNone (bqstorage_client )
666
- matching_warnings = [
667
- warning for warning in warned if "BQ Storage too old" in str (warning )
668
- ]
669
- assert matching_warnings , "Obsolete dependency warning not raised."
670
-
671
632
def test_create_routine_w_minimal_resource (self ):
672
633
from google .cloud .bigquery .routine import Routine
673
634
from google .cloud .bigquery .routine import RoutineReference
0 commit comments