本文整理匯總了Python中solaris_install.transfer.info.Source.get_children方法的典型用法代碼示例。如果您正苦於以下問題:Python Source.get_children方法的具體用法?Python Source.get_children怎麽用?Python Source.get_children使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類solaris_install.transfer.info.Source
的用法示例。
在下文中一共展示了Source.get_children方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: test_file_name
# 需要導入模塊: from solaris_install.transfer.info import Source [as 別名]
# 或者: from solaris_install.transfer.info.Source import get_children [as 別名]
def test_file_name(self):
'''Test that Origin is set correctly in the node'''
p5i_node = Software("transfer 1")
src = Source()
pub = Publisher()
origin = Origin(self.DEF_P5I_FILE)
pub.insert_children([origin])
src.insert_children([pub])
p5i_node.insert_children([src])
self.doc.insert_children([p5i_node])
soft_list = self.doc.get_children("transfer 1", Software)
for soft in soft_list:
src = soft.get_children("source", Source)[0]
pub = src.get_children("publisher", Publisher)[0]
origin = pub.get_children("origin", Origin)[0]
self.assertTrue(origin.origin == self.DEF_P5I_FILE)