本文整理汇总了Python中cairis.core.EnvironmentParameters.EnvironmentParameters.environments方法的典型用法代码示例。如果您正苦于以下问题:Python EnvironmentParameters.environments方法的具体用法?Python EnvironmentParameters.environments怎么用?Python EnvironmentParameters.environments使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类cairis.core.EnvironmentParameters.EnvironmentParameters
的用法示例。
在下文中一共展示了EnvironmentParameters.environments方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: testCompositeEnvironment
# 需要导入模块: from cairis.core.EnvironmentParameters import EnvironmentParameters [as 别名]
# 或者: from cairis.core.EnvironmentParameters.EnvironmentParameters import environments [as 别名]
def testCompositeEnvironment(self):
iep1 = EnvironmentParameters(self.ienvs[0]["theName"],self.ienvs[0]["theShortCode"],self.ienvs[0]["theDescription"])
iep2 = EnvironmentParameters(self.ienvs[1]["theName"],self.ienvs[1]["theShortCode"],self.ienvs[1]["theDescription"])
iep3 = EnvironmentParameters(self.ienvs[2]["theName"],self.ienvs[2]["theShortCode"],self.ienvs[2]["theDescription"])
b = Borg()
b.dbProxy.addEnvironment(iep1)
b.dbProxy.addEnvironment(iep2)
b.dbProxy.addEnvironment(iep3)
iep4 = EnvironmentParameters(self.ienvs[3]["Composite_name"],'COMP','Composite test',[iep1.name(),iep2.name(),iep3.name()],self.ienvs[4]["Duplication"])
b.dbProxy.addEnvironment(iep4)
oenvs = b.dbProxy.getEnvironments()
oep4 = oenvs[self.ienvs[3]["Composite_name"]]
self.assertEqual(iep4.name(), oep4.name())
self.assertEqual(iep4.shortCode(),oep4.shortCode())
self.assertEqual(iep4.description(),oep4.description())
self.assertEqual(iep4.environments(),oep4.environments())
self.assertEqual(iep4.duplicateProperty(),oep4.duplicateProperty())
oep1 = oenvs[self.ienvs[0]["theName"]]
oep2 = oenvs[self.ienvs[1]["theName"]]
oep3 = oenvs[self.ienvs[2]["theName"]]
self.assertRaises(DatabaseProxyException,b.dbProxy.deleteEnvironment,oep1.id())
b.dbProxy.deleteEnvironment(oep4.id())
b.dbProxy.deleteEnvironment(oep1.id())
b.dbProxy.deleteEnvironment(oep2.id())
b.dbProxy.deleteEnvironment(oep3.id())