Add testcases for cloudkitty-dashboard

Add a testcase for testing rating/reporting panel registration.

Change-Id: Iafbe3968ee7d4bdf90dce9b23ec481d7c816ddc5
This commit is contained in:
Jeremy Liu 2017-02-24 14:46:27 +08:00 committed by Luka Peschke
parent fe857c13bf
commit c00e762602
2 changed files with 16 additions and 2 deletions

View File

@ -20,10 +20,21 @@ test_cloudkittydashboard
Tests for `cloudkittydashboard` module.
"""
from cloudkittydashboard.dashboards.project.rating import \
panel as rating_panel
from cloudkittydashboard.dashboards.project.reporting import \
panel as reporting_panel
from cloudkittydashboard.tests import base
import horizon
class TestCloudkittydashboard(base.TestCase):
def test_something(self):
pass
def test_registered(self):
project_dashboard = horizon.get_dashboard('project')
panel_1 = project_dashboard.get_panel('rating')
self.assertEqual(rating_panel.Project_rating, panel_1.__class__)
panel_2 = project_dashboard.get_panel('reporting')
self.assertEqual(reporting_panel.Project_reporting, panel_2.__class__)

View File

@ -3,6 +3,9 @@
# process, which may cause wedges in the gate later.
hacking>=0.12.0,!=0.13.0,<0.14 # Apache-2.0
# Require Horizon
-e git://github.com/openstack/horizon.git#egg=horizon
coverage>=3.6
discover
python-subunit>=0.0.18