示例#1
0
 def test_build_tree_with_prefix(self):
     c = Contacto()
     c.set_data(
         es_persona_juridica=False,
         nom="Perico",
         cognom_1="Palote",
         cognom_2=u"Pérez",
         telefon='555123123',
         prefix='01',
     )
     c.build_tree()
     xml = str(c)
     self.assertXmlEqual(xml, self.loadFile('Contacto_withprefix.xml'))
示例#2
0
 def test_build_tree_juridica(self):
     c = Contacto()
     c.set_data(
         es_persona_juridica=True,
         nom="Acme",
         cognom_1="",
         cognom_2="",
         telefon='',
         prefix='',
     )
     c.build_tree()
     xml = str(c)
     self.assertXmlEqual(xml, self.loadFile('Contacto_juridica.xml'))
示例#3
0
 def test_build_tree_with_phone(self):
     c = Contacto()
     c.set_data(
         es_persona_juridica=False,
         nom="Perico",
         cognom_1="Palote",
         cognom_2=u"Pérez",
         telefon="555123123",
         prefix="",
     )
     c.build_tree()
     xml = str(c)
     self.assertXmlEqual(xml, self.loadFile("Contacto_withphone.xml"))
示例#4
0
 def test_build_tree_with_prefix(self):
     c = Contacto()
     c.set_data(
         es_persona_juridica=False,
         nom="Perico",
         cognom_1="Palote",
         cognom_2=u"Pérez",
         telefon='555123123',
         prefix='01',
     )
     c.build_tree()
     xml = str(c)
     self.assertXmlEqual(xml, self.loadFile('Contacto_withprefix.xml'))
示例#5
0
 def test_build_tree_juridica(self):
     c = Contacto()
     c.set_data(
         es_persona_juridica=True,
         nom="Acme",
         cognom_1="",
         cognom_2="",
         telefon='',
         prefix='',
     )
     c.build_tree()
     xml = str(c)
     self.assertXmlEqual(xml, self.loadFile('Contacto_juridica.xml'))