Esempio n. 1
0
    def test_get_stations_table(self):

        html = milk.get_page(1, self.CACHE_DIR)
        table = milk.extract_stations_table(html)

        self.assertEquals(table.tag, "table")
        self.assertEquals(table.get('class'), "cqwpGridViewTable " \
                         "cqwpGridViewTableFullVaccines PaymentsGridViewGroup")
Esempio n. 2
0
    def test_get_stations_table(self):

        html = milk.get_page(1, self.CACHE_DIR)
        table = milk.extract_stations_table(html)

        self.assertEquals(table.tag, "table")
        self.assertEquals(table.get('class'), "cqwpGridViewTable " \
                         "cqwpGridViewTableFullVaccines PaymentsGridViewGroup")
Esempio n. 3
0
    def test_get_stations_rows(self):

        html = milk.get_page(1, self.CACHE_DIR)
        table = milk.extract_stations_table(html)
        rows = milk.extract_station_rows(table)

        self.assertEquals(15, len(rows))
        for row in rows:
            self.assertEquals(2, len(row))
Esempio n. 4
0
    def test_get_stations_rows(self):

        html = milk.get_page(1, self.CACHE_DIR)
        table = milk.extract_stations_table(html)
        rows = milk.extract_station_rows(table)

        self.assertEquals(15, len(rows))
        for row in rows:
            self.assertEquals(2, len(row))
Esempio n. 5
0
 def get_a_station(self, page=1, index=9):
     html = milk.get_page(page, self.CACHE_DIR)
     table = milk.extract_stations_table(html)
     rows = milk.extract_station_rows(table)
     station = milk.extract_station_from_row(rows[index])
     return station
Esempio n. 6
0
 def get_a_station(self, page=1, index=9):
     html = milk.get_page(page, self.CACHE_DIR)
     table = milk.extract_stations_table(html)
     rows = milk.extract_station_rows(table)
     station = milk.extract_station_from_row(rows[index])
     return station