示例#1
0
 def test_set_metric_labels_with_None(self):
     series = monitoring_v3.types.TimeSeries()
     stackdriver.set_metric_labels(series, VIDEO_SIZE_VIEW, [None])
     self.assertEqual(len(series.metric.labels), 1)
示例#2
0
 def test_set_metric_labels(self):
     series = monitoring_v3.types.TimeSeries()
     tag_value = tag_value_module.TagValue("1200")
     stackdriver.set_metric_labels(series, VIDEO_SIZE_VIEW, [tag_value])
     self.assertEqual(len(series.metric.labels), 2)