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'))
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'))
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"))