def _create_sport(self, row): sport = Sport() sport.id = row[0] sport.name = unicode(row[1]) sport.weight = row[2] sport.met = row[3] sport.max_pace = row[4] sport.color = color_from_hex_string(row[5]) return sport
def test_color_from_hex_string_should_correctly_decode_hex_value(self): color = color_from_hex_string("fab") self.assertEquals(0xfab, color.rgb_val)