Example #1
0
    def test_describe(self):
        """Test policy describe."""
        from invenio_groups.models import SubscriptionPolicy

        self.assertTrue(
            SubscriptionPolicy.describe(SubscriptionPolicy.OPEN))
        self.assertTrue(
            SubscriptionPolicy.describe(SubscriptionPolicy.APPROVAL))
        self.assertTrue(
            SubscriptionPolicy.describe(SubscriptionPolicy.CLOSED))
        self.assertIsNone(SubscriptionPolicy.describe("INVALID"))