本文整理汇总了Python中boto.ec2.volume.Volume.startElement方法的典型用法代码示例。如果您正苦于以下问题:Python Volume.startElement方法的具体用法?Python Volume.startElement怎么用?Python Volume.startElement使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类boto.ec2.volume.Volume
的用法示例。
在下文中一共展示了Volume.startElement方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_startElement_calls_TaggedEC2Object_startElement_with_correct_args
# 需要导入模块: from boto.ec2.volume import Volume [as 别名]
# 或者: from boto.ec2.volume.Volume import startElement [as 别名]
def test_startElement_calls_TaggedEC2Object_startElement_with_correct_args(self, startElement):
volume = Volume()
volume.startElement("some name", "some attrs", None)
startElement.assert_called_with(
"some name",
"some attrs",
None
)
示例2: test_startElement_with_name_attachmentSet_returns_AttachmentSet
# 需要导入模块: from boto.ec2.volume import Volume [as 别名]
# 或者: from boto.ec2.volume.Volume import startElement [as 别名]
def test_startElement_with_name_attachmentSet_returns_AttachmentSet(self, startElement):
startElement.return_value = None
attach_data = AttachmentSet()
volume = Volume()
volume.attach_data = attach_data
retval = volume.startElement("attachmentSet", None, None)
self.assertEqual(retval, volume.attach_data)
示例3: test_startElement_with_name_tagSet_calls_ResultSet
# 需要导入模块: from boto.ec2.volume import Volume [as 别名]
# 或者: from boto.ec2.volume.Volume import startElement [as 别名]
def test_startElement_with_name_tagSet_calls_ResultSet(self, ResultSet, startElement):
startElement.return_value = None
result_set = mock.Mock(ResultSet([("item", Tag)]))
volume = Volume()
volume.tags = result_set
retval = volume.startElement("tagSet", None, None)
self.assertEqual(retval, volume.tags)
示例4: test_startElement_else_returns_None
# 需要导入模块: from boto.ec2.volume import Volume [as 别名]
# 或者: from boto.ec2.volume.Volume import startElement [as 别名]
def test_startElement_else_returns_None(self, startElement):
startElement.return_value = None
volume = Volume()
retval = volume.startElement("not tagSet or attachmentSet", None, None)
self.assertEqual(retval, None)
示例5: test_startElement_retval_not_None_returns_correct_thing
# 需要导入模块: from boto.ec2.volume import Volume [as 别名]
# 或者: from boto.ec2.volume.Volume import startElement [as 别名]
def test_startElement_retval_not_None_returns_correct_thing(self, startElement):
tag_set = mock.Mock(TagSet)
startElement.return_value = tag_set
volume = Volume()
retval = volume.startElement(None, None, None)
self.assertEqual(retval, tag_set)