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


Python PageUidDepot.createUid方法代码示例

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


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

示例1: testReadOnly_02

# 需要导入模块: from outwiker.core.pageuiddepot import PageUidDepot [as 别名]
# 或者: from outwiker.core.pageuiddepot.PageUidDepot import createUid [as 别名]
    def testReadOnly_02(self):
        depot = PageUidDepot()
        page = self.wikiroot["Страница 2/Страница 3"]
        depot.createUid(page)

        page.readonly = True

        depot.createUid(page)
开发者ID:Jenyay,项目名称:outwiker,代码行数:10,代码来源:test_pageuiddepot.py

示例2: testRemovePage

# 需要导入模块: from outwiker.core.pageuiddepot import PageUidDepot [as 别名]
# 或者: from outwiker.core.pageuiddepot.PageUidDepot import createUid [as 别名]
    def testRemovePage(self):
        depot = PageUidDepot()
        page = self.wikiroot["Страница 2/Страница 3"]
        uid = depot.createUid(page)

        page.remove()
        self.assertEqual(depot[uid], None)
开发者ID:Jenyay,项目名称:outwiker,代码行数:9,代码来源:test_pageuiddepot.py

示例3: testSaveLoad_01

# 需要导入模块: from outwiker.core.pageuiddepot import PageUidDepot [as 别名]
# 或者: from outwiker.core.pageuiddepot.PageUidDepot import createUid [as 别名]
    def testSaveLoad_01(self):
        depot = PageUidDepot()
        uid = depot.createUid(self.wikiroot["Страница 1"])

        depot_new = PageUidDepot(self.wikiroot)

        self.assertEqual(depot_new[uid].title, "Страница 1")
开发者ID:Jenyay,项目名称:outwiker,代码行数:9,代码来源:test_pageuiddepot.py

示例4: testSaveLoad_02

# 需要导入模块: from outwiker.core.pageuiddepot import PageUidDepot [as 别名]
# 或者: from outwiker.core.pageuiddepot.PageUidDepot import createUid [as 别名]
    def testSaveLoad_02 (self):
        depot = PageUidDepot()
        uid = depot.createUid (self.wikiroot[u"Страница 2/Страница 3/Страница 4"])

        depot_new = PageUidDepot(self.wikiroot)

        self.assertEqual (depot_new[uid].title, u"Страница 4")
开发者ID:LihMeh,项目名称:outwiker,代码行数:9,代码来源:pageuiddepot.py

示例5: testApplication_01

# 需要导入模块: from outwiker.core.pageuiddepot import PageUidDepot [as 别名]
# 或者: from outwiker.core.pageuiddepot.PageUidDepot import createUid [as 别名]
    def testApplication_01(self):
        depot = PageUidDepot()
        page = self.wikiroot["Страница 2/Страница 3"]
        uid = depot.createUid(page)

        Application.wikiroot = self.wikiroot

        self.assertEqual(Application.pageUidDepot[uid].title, "Страница 3")
开发者ID:Jenyay,项目名称:outwiker,代码行数:10,代码来源:test_pageuiddepot.py

示例6: testRenamePage

# 需要导入模块: from outwiker.core.pageuiddepot import PageUidDepot [as 别名]
# 或者: from outwiker.core.pageuiddepot.PageUidDepot import createUid [as 别名]
    def testRenamePage(self):
        depot = PageUidDepot()
        page = self.wikiroot["Страница 2/Страница 3"]
        uid = depot.createUid(page)

        page.title = "Новый заголовок"
        self.assertEqual(depot[uid].title, "Новый заголовок")

        depot_new = PageUidDepot(self.wikiroot)
        self.assertEqual(depot_new[uid].title, "Новый заголовок")
开发者ID:Jenyay,项目名称:outwiker,代码行数:12,代码来源:test_pageuiddepot.py

示例7: testMovePage

# 需要导入模块: from outwiker.core.pageuiddepot import PageUidDepot [as 别名]
# 或者: from outwiker.core.pageuiddepot.PageUidDepot import createUid [as 别名]
    def testMovePage(self):
        depot = PageUidDepot()
        page = self.wikiroot["Страница 2/Страница 3"]
        uid = depot.createUid(page)

        page.moveTo(self.wikiroot)
        self.assertEqual(depot[uid].title, "Страница 3")

        depot_new = PageUidDepot(self.wikiroot)
        self.assertEqual(depot_new[uid].title, "Страница 3")
        self.assertEqual(depot_new[uid].parent, self.wikiroot)
开发者ID:Jenyay,项目名称:outwiker,代码行数:13,代码来源:test_pageuiddepot.py

示例8: testCreateUid_03

# 需要导入模块: from outwiker.core.pageuiddepot import PageUidDepot [as 别名]
# 或者: from outwiker.core.pageuiddepot.PageUidDepot import createUid [as 别名]
 def testCreateUid_03(self):
     depot = PageUidDepot()
     uid = depot.createUid(self.wikiroot["Страница 1"])
     self.assertEqual(depot[uid.upper()], self.wikiroot["Страница 1"])
开发者ID:Jenyay,项目名称:outwiker,代码行数:6,代码来源:test_pageuiddepot.py

示例9: testCreateUid_02

# 需要导入模块: from outwiker.core.pageuiddepot import PageUidDepot [as 别名]
# 或者: from outwiker.core.pageuiddepot.PageUidDepot import createUid [as 别名]
    def testCreateUid_02(self):
        depot = PageUidDepot()
        uid = depot.createUid(self.wikiroot["Страница 1"])
        uid_new = depot.createUid(self.wikiroot["Страница 1"])

        self.assertEqual(uid, uid_new)
开发者ID:Jenyay,项目名称:outwiker,代码行数:8,代码来源:test_pageuiddepot.py


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