def parse_data_rate_column(column, weights, results): """ Parse a column of rates and connect them to the correct column. """ zone = Utils.strip_non_digit_characters(column[0]) for (counter, line) in enumerate(column[1:]): weight = weights[counter] rate = Utils.clean_price_string(line) results.append({"weight": weight, "zone": zone, "rate": rate})
def test_should_remove_leading_and_trailing_characters_from_price(self): self.assertEquals("123.23", Utils.clean_price_string("$123.23"))