Beispiel #1
0
 def test_toggle_badge_off(self):
     ps_badge = OrganizationBadge(kind=PUBLIC_SERVICE)
     certified_badge = OrganizationBadge(kind=CERTIFIED)
     org = OrganizationFactory(badges=[ps_badge, certified_badge])
     toggle(str(org.id), PUBLIC_SERVICE)
     org.reload()
     self.assertEqual(org.badges[0].kind, CERTIFIED)
Beispiel #2
0
 def test_toggle_badge_off(self):
     ps_badge = OrganizationBadge(kind=PUBLIC_SERVICE)
     certified_badge = OrganizationBadge(kind=CERTIFIED)
     org = OrganizationFactory(badges=[ps_badge, certified_badge])
     toggle(str(org.id), PUBLIC_SERVICE)
     org.reload()
     self.assertEqual(org.badges[0].kind, CERTIFIED)
Beispiel #3
0
 def test_toggle_badge_on(self):
     org = OrganizationFactory()
     toggle(str(org.id), PUBLIC_SERVICE)
     org.reload()
     self.assertEqual(org.badges[0].kind, PUBLIC_SERVICE)
Beispiel #4
0
 def test_toggle_badge_on(self):
     org = OrganizationFactory()
     toggle(str(org.id), PUBLIC_SERVICE)
     org.reload()
     self.assertEqual(org.badges[0].kind, PUBLIC_SERVICE)