def test_normalize_names_removes_none_alphanumeric_dashes(self):
     self.assertEqual(
         "namewithinvalidcharsandall",
         normalize_metric_name("#+name?with~invalid!chars(and)all*&")
     )
 def test_normalize_metric_names_replaces_spaces(self):
     self.assertEqual(
         "metric_name_with_spaces",
         normalize_metric_name("metric name with spaces")
     )
 def test_normalize_metric_names_replaces_slashes_and_backslashes(self):
     self.assertEqual(
         "metric-name-with-slashes",
         normalize_metric_name("metric/name\\with/slashes")
     )
 def test_normalize_metric_names_keeps_good_names(self):
     self.assertEqual(
         "metric.good.name",
         normalize_metric_name("metric.good.name")
     )
Example #5
0
 def test_normalize_names_removes_none_alphanumeric_dashes(self):
     self.assertEqual(
         "namewithinvalidcharsandall",
         normalize_metric_name("#+name?with~invalid!chars(and)all*&")
     )
Example #6
0
 def test_normalize_metric_names_replaces_slashes_and_backslashes(self):
     self.assertEqual(
         "metric-name-with-slashes",
         normalize_metric_name("metric/name\\with/slashes")
     )
Example #7
0
 def test_normalize_metric_names_replaces_spaces(self):
     self.assertEqual(
         "metric_name_with_spaces",
         normalize_metric_name("metric name with spaces")
     )
Example #8
0
 def test_normalize_metric_names_keeps_good_names(self):
     self.assertEqual(
         "metric.good.name",
         normalize_metric_name("metric.good.name")
     )