当前位置: 首页>>代码示例>>Python>>正文


Python Dogs.register方法代码示例

本文整理汇总了Python中horizon.test.test_dashboards.dogs.dashboard.Dogs.register方法的典型用法代码示例。如果您正苦于以下问题:Python Dogs.register方法的具体用法?Python Dogs.register怎么用?Python Dogs.register使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在horizon.test.test_dashboards.dogs.dashboard.Dogs的用法示例。


在下文中一共展示了Dogs.register方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: tearDown

# 需要导入模块: from horizon.test.test_dashboards.dogs.dashboard import Dogs [as 别名]
# 或者: from horizon.test.test_dashboards.dogs.dashboard.Dogs import register [as 别名]
 def tearDown(self):
     # Restore dash
     cats = horizon.get_dashboard("cats")
     cats.name = "Cats"
     horizon.register(Dogs)
     self._discovered_dashboards.append(Dogs)
     Dogs.register(Puppies)
     Cats.register(Tigers)
     super(CustomPanelTests, self).tearDown()
     settings.HORIZON_CONFIG.pop('customization_module')
     # refresh config
     conf.HORIZON_CONFIG._setup()
开发者ID:infraredgirl,项目名称:horizon,代码行数:14,代码来源:base.py

示例2: setUp

# 需要导入模块: from horizon.test.test_dashboards.dogs.dashboard import Dogs [as 别名]
# 或者: from horizon.test.test_dashboards.dogs.dashboard.Dogs import register [as 别名]
 def setUp(self):
     super(BaseHorizonTests, self).setUp()
     # Adjust our horizon config and register our custom dashboards/panels.
     self.old_default_dash = settings.HORIZON_CONFIG['default_dashboard']
     settings.HORIZON_CONFIG['default_dashboard'] = 'cats'
     self.old_dashboards = settings.HORIZON_CONFIG['dashboards']
     settings.HORIZON_CONFIG['dashboards'] = ('cats', 'dogs')
     base.Horizon.register(Cats)
     base.Horizon.register(Dogs)
     Cats.register(Kittens)
     Cats.register(Tigers)
     Dogs.register(Puppies)
     # Trigger discovery, registration, and URLconf generation if it
     # hasn't happened yet.
     base.Horizon._urls()
     # Store our original dashboards
     self._discovered_dashboards = list(base.Horizon._registry)
     # Gather up and store our original panels for each dashboard
     self._discovered_panels = {}
     for dash in self._discovered_dashboards:
         panels = list(base.Horizon._registry[dash]._registry)
         self._discovered_panels[dash] = panels
开发者ID:infraredgirl,项目名称:horizon,代码行数:24,代码来源:base.py

示例3: setUp

# 需要导入模块: from horizon.test.test_dashboards.dogs.dashboard import Dogs [as 别名]
# 或者: from horizon.test.test_dashboards.dogs.dashboard.Dogs import register [as 别名]
 def setUp(self):
     super(RbacHorizonTests, self).setUp()
     # Adjust our horizon config and register our custom dashboards/panels.
     self.old_default_dash = settings.HORIZON_CONFIG['default_dashboard']
     settings.HORIZON_CONFIG['default_dashboard'] = 'cats'
     self.old_dashboards = settings.HORIZON_CONFIG['dashboards']
     settings.HORIZON_CONFIG['dashboards'] = ('cats', 'dogs')
     base.Horizon.register(Cats)
     base.Horizon.register(Dogs)
     Cats.register(RbacNoAccessPanel)
     Cats.default_panel = 'rbac_panel_no'
     Dogs.register(RbacYesAccessPanel)
     Dogs.default_panel = 'rbac_panel_yes'
     # Trigger discovery, registration, and URLconf generation if it
     # hasn't happened yet.
     base.Horizon._urls()
     # Store our original dashboards
     self._discovered_dashboards = base.Horizon._registry.keys()
     # Gather up and store our original panels for each dashboard
     self._discovered_panels = {}
     for dash in self._discovered_dashboards:
         panels = base.Horizon._registry[dash]._registry.keys()
         self._discovered_panels[dash] = panels
开发者ID:akamat-ibm,项目名称:Autoport,代码行数:25,代码来源:base.py


注:本文中的horizon.test.test_dashboards.dogs.dashboard.Dogs.register方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。