projects
/
osm
/
MON.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "Get Metric_UUID directly from VIM Change-Id: I9b8c47b2fd7987f8834dc7c90e826d9d...
[osm/MON.git]
/
osm_mon
/
test
/
OpenStack
/
test_metric_calls.py
diff --git
a/osm_mon/test/OpenStack/test_metric_calls.py
b/osm_mon/test/OpenStack/test_metric_calls.py
index
b77df5e
..
51282b1
100644
(file)
--- a/
osm_mon/test/OpenStack/test_metric_calls.py
+++ b/
osm_mon/test/OpenStack/test_metric_calls.py
@@
-238,13
+238,16
@@
class TestMetricCalls(unittest.TestCase):
self.assertEqual(metric_name, "my_invalid_metric")
self.assertEqual(norm_name, None)
self.assertEqual(metric_name, "my_invalid_metric")
self.assertEqual(norm_name, None)
+ @mock.patch.object(metric_req.Metrics, "get_metric_id")
@mock.patch.object(Common, "perform_request")
@mock.patch.object(Common, "perform_request")
- def test_valid_read_data_req(self, perf_req):
+ def test_valid_read_data_req(self, perf_req
, get_metric
):
"""Test the read metric data function, for a valid call."""
"""Test the read metric data function, for a valid call."""
- values = {"metric_uuid": "metric_id",
+ values = {"metric_name": "disk_write_ops",
+ "resource_uuid": "resource_id",
"collection_unit": "DAY",
"collection_period": 1}
"collection_unit": "DAY",
"collection_period": 1}
+ get_metric.return_value = "metric_id"
self.metrics.read_metric_data(endpoint, auth_token, values)
perf_req.assert_called_once()
self.metrics.read_metric_data(endpoint, auth_token, values)
perf_req.assert_called_once()