Example #1
0
 def test_score(self):
     PLAYS.add_or_update(VIMEO_ID, 1001)
     LIKES.add_or_update(VIMEO_ID, 0.25)
     self.assertEquals(5, score(VIMEO_ID, 10))
Example #2
0
 def test_score_zero_for_too_few_plays(self):
     PLAYS.add_or_update(VIMEO_ID, 99)
     self.assertEquals(0, score(VIMEO_ID, 100))