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


Python EnvironmentParameters.description方法代码示例

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


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

示例1: testStandardEnvironment

# 需要导入模块: from cairis.core.EnvironmentParameters import EnvironmentParameters [as 别名]
# 或者: from cairis.core.EnvironmentParameters.EnvironmentParameters import description [as 别名]
  def testStandardEnvironment(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)
    oenvs = b.dbProxy.getEnvironments()
    oep1 = oenvs[self.ienvs[0]["theName"]]
    self.assertEqual(iep1.name(), oep1.name())
    self.assertEqual(iep1.shortCode(),oep1.shortCode())
    self.assertEqual(iep1.description(),oep1.description())
    oep2 = oenvs[self.ienvs[1]["theName"]]
    self.assertEqual(iep2.name(), oep2.name())
    self.assertEqual(iep2.shortCode(),oep2.shortCode())
    self.assertEqual(iep2.description(),oep2.description())
    oep3 = oenvs[self.ienvs[2]["theName"]]
    self.assertEqual(iep3.name(), oep3.name())
    self.assertEqual(iep3.shortCode(),oep3.shortCode())
    self.assertEqual(iep3.description(),oep3.description())

    b.dbProxy.deleteEnvironment(oep1.id())
    b.dbProxy.deleteEnvironment(oep2.id())
    b.dbProxy.deleteEnvironment(oep3.id())
开发者ID:InvalidToken,项目名称:CAIRIS,代码行数:27,代码来源:test_Environment.py

示例2: testCompositeEnvironment

# 需要导入模块: from cairis.core.EnvironmentParameters import EnvironmentParameters [as 别名]
# 或者: from cairis.core.EnvironmentParameters.EnvironmentParameters import description [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())
开发者ID:InvalidToken,项目名称:CAIRIS,代码行数:31,代码来源:test_Environment.py


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