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)
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)
def test_toggle_badge_on(self): org = OrganizationFactory() toggle(str(org.id), PUBLIC_SERVICE) org.reload() self.assertEqual(org.badges[0].kind, PUBLIC_SERVICE)
def test_toggle_badge_on(self): org = OrganizationFactory() toggle(str(org.id), PUBLIC_SERVICE) org.reload() self.assertEqual(org.badges[0].kind, PUBLIC_SERVICE)