本文整理汇总了Python中app_dashboard_data.AppDashboardData.update_application_info方法的典型用法代码示例。如果您正苦于以下问题:Python AppDashboardData.update_application_info方法的具体用法?Python AppDashboardData.update_application_info怎么用?Python AppDashboardData.update_application_info使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类app_dashboard_data.AppDashboardData
的用法示例。
在下文中一共展示了AppDashboardData.update_application_info方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_update_application_info_no_apps
# 需要导入模块: from app_dashboard_data import AppDashboardData [as 别名]
# 或者: from app_dashboard_data.AppDashboardData import update_application_info [as 别名]
def test_update_application_info_no_apps(self):
flexmock(AppDashboardHelper).should_receive('get_status_info')\
.and_return([{
'apps' : { 'none' : False }
}]).once()
flexmock(AppDashboardHelper).should_receive('get_login_host')\
.and_return('1.1.1.1').never()
flexmock(AppDashboardHelper).should_receive('get_app_port')\
.and_return('8080').never()
self.setupAppStatusMocks()
self.setupFakePutsAndDeletes()
data1 = AppDashboardData()
output = data1.update_application_info()
self.assertEquals(len(output), 0)
示例2: test_update_application_info_two_apps
# 需要导入模块: from app_dashboard_data import AppDashboardData [as 别名]
# 或者: from app_dashboard_data.AppDashboardData import update_application_info [as 别名]
def test_update_application_info_two_apps(self):
flexmock(AppDashboardHelper).should_receive('get_status_info')\
.and_return([{
'apps' : { 'app1' : True, 'app2' : False }
}]).once()
flexmock(AppDashboardHelper).should_receive('get_login_host')\
.and_return('1.1.1.1').once()
flexmock(AppDashboardHelper).should_receive('get_app_ports')\
.and_return(['8080', '1444']).once()
self.setupAppStatusMocks()
self.setupFakePutsAndDeletes()
data1 = AppDashboardData()
output = data1.update_application_info()
self.assertEquals(len(output), 2)
self.assertEquals(output['app1'], ['http://1.1.1.1:8080',
'https://1.1.1.1:1444'])
self.assertEquals(output['app2'], None)