本文整理汇总了Python中appscale.AppScale.get方法的典型用法代码示例。如果您正苦于以下问题:Python AppScale.get方法的具体用法?Python AppScale.get怎么用?Python AppScale.get使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类appscale.AppScale
的用法示例。
在下文中一共展示了AppScale.get方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: testGetPropertyWithAppScalefile
# 需要导入模块: from appscale import AppScale [as 别名]
# 或者: from appscale.AppScale import get [as 别名]
def testGetPropertyWithAppScalefile(self):
# calling 'appscale get' with an AppScalefile in the local
# directory should collect any parameters needed for the
# 'appscale-get-property' command and then exec it
appscale = AppScale()
# Mock out the actual file reading itself, and slip in a YAML-dumped
# file
contents = {
'infrastructure' : 'ec2',
'machine' : 'ami-ABCDEFG',
'keyname' : 'bookey',
'group' : 'boogroup',
'verbose' : True,
'min' : 1,
'max' : 1
}
yaml_dumped_contents = yaml.dump(contents)
self.addMockForAppScalefile(appscale, yaml_dumped_contents)
# finally, mock out the actual appscale-get-property call
flexmock(AppScaleTools)
AppScaleTools.should_receive('get_property')
appscale.get('.*')