def remove(self, elem):
        """Remove a requirement.

        :param elem: a string or :class:`Requirement` instance.
        """
        if isinstance(elem, text_type):
            for requirement in self:
                if requirement.package == elem:
                    return super(Requirements, self).remove(requirement)
        return super(Requirements, self).remove(elem)
def test_can_encode_relationship_with_alternative_names(self):
        a = Node("Person", nom=u"Aimée")
        b = Node("Person", nom=u"Baptiste")
        ab = KNOWS_FR(a, b)
        encoded = cypher_repr(ab, related_node_template=u"{property.nom}")
        self.assertEqual(u"(Aimée)-[:CONNAÎT {}]->(Baptiste)", encoded)