From ead747a25ab33818496f993d47c455e65db57b9f Mon Sep 17 00:00:00 2001 From: nachandr Date: Thu, 11 Apr 2019 11:32:00 -0500 Subject: [PATCH] Tests for grouping cluster candu graphs by tags --- cfme/tests/candu/test_graph_groupbytag.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cfme/tests/candu/test_graph_groupbytag.py b/cfme/tests/candu/test_graph_groupbytag.py index dcca71f67f..e1d52a1fde 100644 --- a/cfme/tests/candu/test_graph_groupbytag.py +++ b/cfme/tests/candu/test_graph_groupbytag.py @@ -79,9 +79,15 @@ def test_tagwise(candu_db_restore, interval, graph_type, gp_by, entity, entity_o data = {'interval': interval, 'group_by': gp_by} view.options.fill(data) + graph_zoom = ["cluster_host", "cluster_vm"] + avg_graph = graph_type if graph_type in graph_zoom else "{}_vm_host_avg".format(graph_type) + # Check graph displayed or not try: - graph = getattr(view.interval_type, entity + '_' + graph_type) + if entity == 'host': + graph = getattr(view.interval_type, entity + '_' + graph_type) + elif entity == 'cluster': + avg_graph = getattr(view, avg_graph) except AttributeError: pytest.fail('{}_{} graph was not displayed'.format(entity, graph_type)) assert graph.is_displayed