示例#1
0
 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
示例#2
0
 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
示例#3
0
 def test_color_from_hex_string_should_correctly_decode_hex_value(self):
     color = color_from_hex_string("fab")
     self.assertEquals(0xfab, color.rgb_val)
示例#4
0
 def test_color_from_hex_string_should_correctly_decode_hex_value(self):
     color = color_from_hex_string("fab")
     self.assertEquals(0xfab, color.rgb_val)