Exemplo n.º 1
0
	def testRemoveAttribute(self):
		"""
		Tests :meth:`foundations.nodes.AbstractNode.removeAttribute` method.
		"""

		attributes = {"attributeA" : Attribute(), "attributeB" : Attribute()}

		nodeA = AbstractNode("MyNodeA")
		for attribute, value in attributes.iteritems():
			self.assertTrue(nodeA.addAttribute(attribute, value))
			self.assertTrue(nodeA.removeAttribute(attribute))
			self.assertFalse(nodeA.attributeExists(attribute))