本文整理匯總了Python中outwiker.core.pageuiddepot.PageUidDepot.changeUid方法的典型用法代碼示例。如果您正苦於以下問題:Python PageUidDepot.changeUid方法的具體用法?Python PageUidDepot.changeUid怎麽用?Python PageUidDepot.changeUid使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類outwiker.core.pageuiddepot.PageUidDepot
的用法示例。
在下文中一共展示了PageUidDepot.changeUid方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: testChangeUid_09
# 需要導入模塊: from outwiker.core.pageuiddepot import PageUidDepot [as 別名]
# 或者: from outwiker.core.pageuiddepot.PageUidDepot import changeUid [as 別名]
def testChangeUid_09(self):
depot = PageUidDepot()
page = self.wikiroot["Страница 2/Страница 3"]
new_uid = "АБЫРВАЛГ"
depot.changeUid(page, new_uid)
self.assertEqual(depot["абырвалг"].title, "Страница 3")
示例2: testChangeUid_05
# 需要導入模塊: from outwiker.core.pageuiddepot import PageUidDepot [as 別名]
# 或者: from outwiker.core.pageuiddepot.PageUidDepot import changeUid [as 別名]
def testChangeUid_05(self):
depot = PageUidDepot()
page = self.wikiroot["Страница 2/Страница 3"]
new_uid = "Абырвалг"
depot.changeUid(page, new_uid)
page.remove()
self.assertEqual(depot[new_uid], None)
示例3: testChangeUid_04
# 需要導入模塊: from outwiker.core.pageuiddepot import PageUidDepot [as 別名]
# 或者: from outwiker.core.pageuiddepot.PageUidDepot import changeUid [as 別名]
def testChangeUid_04 (self):
depot = PageUidDepot()
page = self.wikiroot[u"Страница 2/Страница 3"]
new_uid = u"Абырвалг"
depot.changeUid (page, new_uid)
self.assertRaises (ValueError,
depot.changeUid, self.wikiroot[u"Страница 1"], u"")
示例4: testChangeUid_10
# 需要導入模塊: from outwiker.core.pageuiddepot import PageUidDepot [as 別名]
# 或者: from outwiker.core.pageuiddepot.PageUidDepot import changeUid [as 別名]
def testChangeUid_10(self):
depot = PageUidDepot()
new_uid = "Абырвалг"
depot.changeUid(self.wikiroot["Страница 2/Страница 3"], new_uid)
depot2 = PageUidDepot()
depot2.changeUid(self.wikiroot["Страница 2"], new_uid)
depot3 = PageUidDepot(self.wikiroot)
self.assertEqual(depot3[new_uid].title, "Страница 3")
示例5: testChangeUid_08
# 需要導入模塊: from outwiker.core.pageuiddepot import PageUidDepot [as 別名]
# 或者: from outwiker.core.pageuiddepot.PageUidDepot import changeUid [as 別名]
def testChangeUid_08(self):
depot = PageUidDepot()
page = self.wikiroot["Страница 2/Страница 3"]
new_uid = "Абырвалг"
depot.changeUid(page, new_uid)
self.assertRaises(KeyError,
depot.changeUid,
self.wikiroot["Страница 1"],
"абырвалг")
示例6: testChangeUid_01
# 需要導入模塊: from outwiker.core.pageuiddepot import PageUidDepot [as 別名]
# 或者: from outwiker.core.pageuiddepot.PageUidDepot import changeUid [as 別名]
def testChangeUid_01(self):
depot = PageUidDepot()
page = self.wikiroot["Страница 2/Страница 3"]
new_uid = "Абырвалг"
depot.changeUid(page, new_uid)
self.assertEqual(depot[new_uid].title, "Страница 3")
depot_new = PageUidDepot(self.wikiroot)
self.assertEqual(depot_new[new_uid].title, "Страница 3")