def test_delete_snapshot(self): channel = ChannelStub() client = bigtable_admin_v2.BigtableTableAdminClient(channel=channel) # Setup Request name = client.snapshot_path('[PROJECT]', '[INSTANCE]', '[CLUSTER]', '[SNAPSHOT]') client.delete_snapshot(name) assert len(channel.requests) == 1 expected_request = bigtable_table_admin_pb2.DeleteSnapshotRequest( name=name) actual_request = channel.requests[0][1] assert expected_request == actual_request
def test_delete_snapshot(self): channel = ChannelStub() patch = mock.patch("google.api_core.grpc_helpers.create_channel") with patch as create_channel: create_channel.return_value = channel client = bigtable_admin_v2.BigtableTableAdminClient() # Setup Request name = client.snapshot_path("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[SNAPSHOT]") client.delete_snapshot(name) assert len(channel.requests) == 1 expected_request = bigtable_table_admin_pb2.DeleteSnapshotRequest( name=name) actual_request = channel.requests[0][1] assert expected_request == actual_request