當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。