def test_build_tree_fecha_caducidad(self): c = CiePapel() data = copy(self.basic_data) data.update({'fecha_caducidad': '9999-01-01'}) c.feed(data) c.build_tree() xml = str(c) self.assertXmlEqual(xml, self.loadFile('CiePapel_caducidad.xml'))
def test_build_tree_seccion(self): c = CiePapel() data = copy(self.basic_data) data.update({'seccion_cable': 16}) c.feed(data) c.build_tree() xml = str(c) self.assertXmlEqual(xml, self.loadFile('CiePapel_seccion.xml'))
def test_build_tree_diferencial(self): c = CiePapel() data = copy(self.basic_data) data.update({"intensidad_diferencial": 20, "sensibilidad_diferencial": 300}) c.feed(data) c.build_tree() xml = str(c) self.assertXmlEqual(xml, self.loadFile("CiePapel_diferencial.xml"))
def test_build_tree_codigo_instalador(self): c = CiePapel() data = copy(self.basic_data) data.update({'codigo_instalador': '987654321'}) del data['nif_instalador'] c.feed(data) c.build_tree() xml = str(c) self.assertXmlEqual(xml, self.loadFile('CiePapel_codinst.xml'))
def test_build_tree_codigo_instalador(self): c = CiePapel() data = copy(self.basic_data) data.update({"codigo_instalador": "987654321"}) del data["nif_instalador"] c.feed(data) c.build_tree() xml = str(c) self.assertXmlEqual(xml, self.loadFile("CiePapel_codinst.xml"))
def setUp(self): cie_paper = CiePapel() cie_paper_data = { 'codigo_cie': '1234567', 'potencia_inst_bt': 3500, 'fecha_emision': '2015-06-04', 'nif_instalador': '12345678Z', 'nombre_instalador': 'Acme', 'tension_suministro': '10', 'tipo_suministro': 'VI', } cie_paper.feed(cie_paper_data) self.basic_data = {'cie_electronico': 'N', 'cie_papel': cie_paper}
def setUp(self): cie_paper = CiePapel() cie_paper_data = { "codigo_cie": "1234567", "potencia_inst_bt": 3500, "fecha_emision": "2015-06-04", "nif_instalador": "12345678Z", "nombre_instalador": "Acme", "tension_suministro": "10", "tipo_suministro": "VI", } cie_paper.feed(cie_paper_data) self.basic_data = {"cie_electronico": "N", "cie_papel": cie_paper}
def test_build_tree_simple(self): c = CiePapel() c.feed(self.basic_data) c.build_tree() xml = str(c) self.assertXmlEqual(xml, self.loadFile('CiePapel_simple.xml'))