Esempio n. 1
0
 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
Esempio n. 2
0
    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 
Esempio n. 3
0
    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