Skip to content
Snippets Groups Projects
Commit 93ec1735 authored by Piotr Maślanka's avatar Piotr Maślanka
Browse files

unit tests for empty metric

parent 88b469da
No related branches found
No related tags found
No related merge requests found
...@@ -42,6 +42,10 @@ class TestMetric(unittest.TestCase): ...@@ -42,6 +42,10 @@ class TestMetric(unittest.TestCase):
self.assertEqual(choose('total.sum', metric_data).value, 3.6) self.assertEqual(choose('total.sum', metric_data).value, 3.6)
self.assertEqual(choose('total.count', metric_data).value, 2) self.assertEqual(choose('total.count', metric_data).value, 2)
def test_empty(self):
metric = getMetric('empty', 'empty')
self.assertEqual(len(metric.to_metric_data().values), 0)
def test_metric_already_exists(self): def test_metric_already_exists(self):
getMetric('testmetric2', 'cps') getMetric('testmetric2', 'cps')
try: try:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment