@@ -738,8 +738,10 @@ def test_sink_update_miss(self):
738
738
739
739
def test_sink_update_hit (self ):
740
740
from google .logging .v2 .logging_config_pb2 import LogSink
741
- response = _LogSinkPB (
742
- self .SINK_NAME , self .FILTER , self .DESTINATION_URI )
741
+
742
+ response = LogSink (name = self .SINK_NAME ,
743
+ destination = self .DESTINATION_URI ,
744
+ filter = self .FILTER )
743
745
gax_api = _GAXSinksAPI (_update_sink_response = response )
744
746
api = self ._makeOne (gax_api )
745
747
@@ -951,8 +953,10 @@ def test_metric_update_miss(self):
951
953
952
954
def test_metric_update_hit (self ):
953
955
from google .logging .v2 .logging_metrics_pb2 import LogMetric
954
- response = _LogMetricPB (
955
- self .METRIC_NAME , self .FILTER , self .DESCRIPTION )
956
+
957
+ response = LogMetric (name = self .METRIC_NAME ,
958
+ description = self .DESCRIPTION ,
959
+ filter = self .FILTER )
956
960
gax_api = _GAXMetricsAPI (_update_log_metric_response = response )
957
961
api = self ._makeOne (gax_api )
958
962
@@ -1109,19 +1113,3 @@ def delete_log_metric(self, metric_name, options=None):
1109
1113
raise GaxError ('error' )
1110
1114
if self ._log_metric_not_found :
1111
1115
raise GaxError ('notfound' , self ._make_grpc_not_found ())
1112
-
1113
-
1114
- class _LogSinkPB (object ):
1115
-
1116
- def __init__ (self , name , destination , filter_ ):
1117
- self .name = name
1118
- self .destination = destination
1119
- self .filter = filter_
1120
-
1121
-
1122
- class _LogMetricPB (object ):
1123
-
1124
- def __init__ (self , name , description , filter_ ):
1125
- self .name = name
1126
- self .description = description
1127
- self .filter = filter_
0 commit comments