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


Python PublishHandler.update方法代码示例

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


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

示例1: testCanPublishPublicAndPrivate

# 需要导入模块: from tardis.apps.ands_register.publishing import PublishHandler [as 别名]
# 或者: from tardis.apps.ands_register.publishing.PublishHandler import update [as 别名]
 def testCanPublishPublicAndPrivate(self):
     # (experiment public: True, access type: private) -> True
     self.e1.public = True
     self.publish_data[self.access_type_key] = "private"
     ph = PublishHandler(self.e1.id, create=True)
     ph.update(self.publish_data)
     self.assertTrue(self.provider.can_publish(self.e1))
开发者ID:aaryani,项目名称:aa-migration-test1,代码行数:9,代码来源:test_rifcsprovider.py

示例2: testCanPublishPublicAndUnpublished

# 需要导入模块: from tardis.apps.ands_register.publishing import PublishHandler [as 别名]
# 或者: from tardis.apps.ands_register.publishing.PublishHandler import update [as 别名]
 def testCanPublishPublicAndUnpublished(self):
     # (experiment public: True, access type: unpublished) -> False
     self.e1.public = True
     self.publish_data[self.access_type_key] = "unpublished"
     ph = PublishHandler(self.e1.id, create=True)
     ph.update(self.publish_data)
     self.assertTrue(self.provider.can_publish(self.e1))
开发者ID:aaryani,项目名称:aa-migration-test1,代码行数:9,代码来源:test_rifcsprovider.py

示例3: testCanPublishNoProject

# 需要导入模块: from tardis.apps.ands_register.publishing import PublishHandler [as 别名]
# 或者: from tardis.apps.ands_register.publishing.PublishHandler import update [as 别名]
 def testCanPublishNoProject(self):
     self.e1.public = True
     self.e1.save()
     ph = PublishHandler(self.e1.id, create=True)
     ph.update(self.publish_data)
     self.assertTrue(self.provider.can_publish(self.e1))    
     self.p1.delete()
     self.assertFalse(self.provider.can_publish(self.e1))    
开发者ID:IntersectAustralia,项目名称:dc2c,代码行数:10,代码来源:test_rifcsprovider.py

示例4: testGetDescriptionCustom

# 需要导入模块: from tardis.apps.ands_register.publishing import PublishHandler [as 别名]
# 或者: from tardis.apps.ands_register.publishing.PublishHandler import update [as 别名]
 def testGetDescriptionCustom(self):
     ph = PublishHandler(self.e1.id, create=True)
     self.publish_data[self.custom_description_key] = self.random_custom_description
     ph.update(self.publish_data)
     self.assertEquals(self.random_custom_description, ph.custom_description())
     
     self.assertEquals(ph.custom_description(), self.random_custom_description)
     description = self.provider.get_description(self.e1)
     
     self.assertEquals(description, self.random_custom_description)
开发者ID:ANSTO,项目名称:mecat-ansto,代码行数:12,代码来源:test_rifcsprovider.py

示例5: testCanPublishPublicAndPublished

# 需要导入模块: from tardis.apps.ands_register.publishing import PublishHandler [as 别名]
# 或者: from tardis.apps.ands_register.publishing.PublishHandler import update [as 别名]
 def testCanPublishPublicAndPublished(self):
     # (experiment public: True, access type: published) -> True
     self.e1.public = True
     ph = PublishHandler(self.e1.id, create=True)
     ph.update(self.publish_data)
     self.assertTrue(self.provider.can_publish(self.e1))
开发者ID:aaryani,项目名称:aa-migration-test1,代码行数:8,代码来源:test_rifcsprovider.py

示例6: testCanPublishNotPublicAndMediated

# 需要导入模块: from tardis.apps.ands_register.publishing import PublishHandler [as 别名]
# 或者: from tardis.apps.ands_register.publishing.PublishHandler import update [as 别名]
 def testCanPublishNotPublicAndMediated(self):
     # (experiment public: False, access type: mediated) -> FALSE
     self.publish_data[self.access_type_key] = "mediated"
     ph = PublishHandler(self.e1.id, create=True)
     ph.update(self.publish_data)
     self.assertFalse(self.provider.can_publish(self.e1))
开发者ID:aaryani,项目名称:aa-migration-test1,代码行数:8,代码来源:test_rifcsprovider.py

示例7: testCanPublishNotPublicAndPublic

# 需要导入模块: from tardis.apps.ands_register.publishing import PublishHandler [as 别名]
# 或者: from tardis.apps.ands_register.publishing.PublishHandler import update [as 别名]
 def testCanPublishNotPublicAndPublic(self):
     # (experiment public: False, access type: public) -> FALSE
     ph = PublishHandler(self.e1.id, create=True)
     ph.update(self.publish_data)
     self.assertFalse(self.provider.can_publish(self.e1))
开发者ID:aaryani,项目名称:aa-migration-test1,代码行数:7,代码来源:test_rifcsprovider.py


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