Ejemplo n.º 1
0
 def test_receive_points_for_commenting(self):
     pull = {'number': 1}
     comment = {'id': 5, u'body': u':sparkles:', 'user':{'login': '******'}}
     pull_author = self.players[1]
     award_comment_achievements(pull, comment, pull_author, self.players)
     comment_author = self.players[0]
     self.assertEquals(1, len(comment_author.achievements))
Ejemplo n.º 2
0
 def test_can_award_bonus_to_others(self):
     pull = {'number': 1}
     comment = {'id': 4, u'body': u':sparkles:', 'user':{'login': '******'}}
     pull_author = self.players[1]
     award_comment_achievements(pull, comment, pull_author, self.players)
     self.assertEquals(1, len(pull_author.achievements))
Ejemplo n.º 3
0
 def test_cannot_award_to_self(self):
     pull = {'number': 1}
     comment = {'id': 3, u'body': u':sparkles:', 'user':{'login': '******'}}
     pull_author = self.players[0]
     award_comment_achievements(pull, comment, pull_author, self.players)
     self.assertEquals(0, len(pull_author.achievements))