예제 #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)
예제 #2
0
파일: test_badges.py 프로젝트: grouan/udata
 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)
예제 #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)
예제 #4
0
파일: test_badges.py 프로젝트: grouan/udata
 def test_toggle_badge_on(self):
     org = OrganizationFactory()
     toggle(str(org.id), PUBLIC_SERVICE)
     org.reload()
     self.assertEqual(org.badges[0].kind, PUBLIC_SERVICE)