def Membership(self): """ Factory method. This method creates new :class:`~pyvotal.memberships.Membership` objects. """ m = Membership() m.person = Person() m.client = self.client return m
def test_can_be_converted_to_xml(self): m = Membership() m.role = 'Owner' p = Person() p.email = '*****@*****.**' p.name = 'Jean-Luc Picard' p.initials = 'jlp' m.person = p assert m._to_xml() == target_xml