@@ -38,7 +38,6 @@ class TestClient(unittest.TestCase):
3838 DISPLAY_NAME = "display-name"
3939 NODE_COUNT = 5
4040 TIMEOUT_SECONDS = 80
41- USER_AGENT = "you-sir-age-int"
4241
4342 def _get_target_class (self ):
4443 from google .cloud import spanner
@@ -54,7 +53,6 @@ def _constructor_test_helper(
5453 creds ,
5554 expected_creds = None ,
5655 client_info = None ,
57- user_agent = None ,
5856 client_options = None ,
5957 query_options = None ,
6058 expected_query_options = None ,
@@ -80,7 +78,6 @@ def _constructor_test_helper(
8078 client = self ._make_one (
8179 project = self .PROJECT ,
8280 credentials = creds ,
83- user_agent = user_agent ,
8481 query_options = query_options ,
8582 ** kwargs
8683 )
@@ -94,7 +91,6 @@ def _constructor_test_helper(
9491
9592 self .assertEqual (client .project , self .PROJECT )
9693 self .assertIs (client ._client_info , expected_client_info )
97- self .assertEqual (client .user_agent , user_agent )
9894 if expected_client_options is not None :
9995 self .assertIsInstance (
10096 client ._client_options , google .api_core .client_options .ClientOptions
@@ -127,20 +123,6 @@ def test_constructor_default_scopes(self):
127123 creds = _make_credentials ()
128124 self ._constructor_test_helper (expected_scopes , creds )
129125
130- @mock .patch ("warnings.warn" )
131- def test_constructor_custom_user_agent_and_timeout (self , mock_warn ):
132- from google .cloud .spanner_v1 import client as MUT
133-
134- CUSTOM_USER_AGENT = "custom-application"
135- expected_scopes = (MUT .SPANNER_ADMIN_SCOPE ,)
136- creds = _make_credentials ()
137- self ._constructor_test_helper (
138- expected_scopes , creds , user_agent = CUSTOM_USER_AGENT
139- )
140- mock_warn .assert_called_once_with (
141- MUT ._USER_AGENT_DEPRECATED , DeprecationWarning , stacklevel = 2
142- )
143-
144126 def test_constructor_custom_client_info (self ):
145127 from google .cloud .spanner_v1 import client as MUT
146128
0 commit comments