Example #1
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))
Example #2
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))
Example #3
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
Example #4
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