Beispiel #1
0
 def testUserHasBadge(self):
     badge = api.create_badge("test_badge", "Test Badge", "test desc")
     api.award(self.user, "test_badge")
     self.assertTrue(api.user_has_badge(self.user, "test_badge"))
Beispiel #2
0
 def testSingleSignal(self):
     api.create_badge("test_badge", "Test Badge", "Test Desc")
     api.badge_awarded.connect(self._gotAward, sender="test_badge")
     api.award(self.user, "test_badge", "reason")
     self.assertTrue(self.awarded)
Beispiel #3
0
 def testCreateBadge(self):
     badge = api.create_badge("test_badge", "Test Badge", "Test Description")
     self.assertEqual(badge, api.find_badge("test_badge"))