@@ -176,51 +176,6 @@ def test_create_with_split_keys(self):
176176 initial_split_keys = ['s1' , 's2' ]
177177 self ._create_test_helper (initial_split_keys )
178178
179- def test_rename (self ):
180- from google .protobuf import empty_pb2
181- from gcloud .bigtable ._generated import (
182- bigtable_table_service_messages_pb2 as messages_pb2 )
183- from gcloud .bigtable ._testing import _FakeStub
184-
185- project_id = 'project-id'
186- zone = 'zone'
187- cluster_id = 'cluster-id'
188- table_id = 'table-id'
189- new_table_id = 'new_table_id'
190- timeout_seconds = 97
191- self .assertNotEqual (new_table_id , table_id )
192-
193- client = _Client (timeout_seconds = timeout_seconds )
194- cluster_name = ('projects/' + project_id + '/zones/' + zone +
195- '/clusters/' + cluster_id )
196- cluster = _Cluster (cluster_name , client = client )
197- table = self ._makeOne (table_id , cluster )
198-
199- # Create request_pb
200- table_name = cluster_name + '/tables/' + table_id
201- request_pb = messages_pb2 .RenameTableRequest (
202- name = table_name ,
203- new_id = new_table_id ,
204- )
205-
206- # Create response_pb
207- response_pb = empty_pb2 .Empty ()
208-
209- # Patch the stub used by the API method.
210- client ._table_stub = stub = _FakeStub (response_pb )
211-
212- # Create expected_result.
213- expected_result = None # rename() has no return value.
214-
215- # Perform the method and check the result.
216- result = table .rename (new_table_id )
217- self .assertEqual (result , expected_result )
218- self .assertEqual (stub .method_calls , [(
219- 'RenameTable' ,
220- (request_pb , timeout_seconds ),
221- {},
222- )])
223-
224179 def _list_column_families_helper (self , column_family_name = None ):
225180 from gcloud .bigtable ._generated import (
226181 bigtable_table_data_pb2 as data_pb2 )
0 commit comments