def test_when_boletin_returns_modulos_seccion_adjudicaciones(self): boletin = BoletinParser(fixtures.boletines[1]) boletin.section_names = ['ADJUDICACIONES', 'DICTAMENES DE EVALUACION', 'LOCACIONES INMUEBLES (LOC)'] modulos = boletin.get_section_elements("Adjudicaciones") self.assertEqual(len(modulos), 4) self.assertEqual(modulos[0][1], "BANCO DE LA NACION ARGENTINA\nAREA COMPRAS Y CONTRATACIONES") self.assertEqual(modulos[2][1], "BLOQUE2")
def test_get_boletin_section_elements_from_a_boletin_file(self): boletin_filename = '/20150720-03.txt' with open(BOLETIN_PATH + boletin_filename, 'r') as boletin_file: boletin_str = boletin_file.read() boletin = BoletinParser(boletin_str) elements = boletin.get_section_elements("Adjudicaciones") self.assertEqual(len(elements), 16)
def test_when_boletin_returns_modulos_seccion_dictamenes(self): boletin = BoletinParser(fixtures.boletines[1]) boletin.section_names = ['ADJUDICACIONES', 'DICTAMENES DE EVALUACION', 'LOCACIONES INMUEBLES (LOC)'] modulos = boletin.get_section_elements("Dictámenes de Evaluación") self.assertEqual(len(modulos), 1)
def test_when_boletin_returns_modulos_seccion_servicios(self): boletin = BoletinParser(fixtures.boletines[1]) boletin.section_names = ['Servicios Tres Palabras Audiovisuales', 'ADJUDICACIONES', 'DICTAMENES DE EVALUACION', 'LOCACIONES INMUEBLES (LOC)'] modulos = boletin.get_section_elements("Servicios Tres Palabras Audiovisuales") self.assertEqual(len(modulos), 2)