def test_returns_false_default_settings_no_workflow(self, mock_gpmw): self.assertFalse(is_moderation_enabled(self.pg1))
def test_returns_false_default_settings_moderation_object_disabled(self): PageModeration.objects.create(extended_object=self.pg1, enabled=False, workflow=self.wf1,) self.assertFalse(is_moderation_enabled(self.pg1))
def test_returns_true_default_settings_has_default_workflow(self): self.assertTrue(is_moderation_enabled(self.pg1))
def test_returns_false_with_override_no_workflows(self): Workflow.objects.all().delete() self.assertFalse(is_moderation_enabled(self.pg1))
def test_returns_true_with_override_moderation_object_enabled(self): PageModeration.objects.create(extended_object=self.pg1, enabled=True, workflow=self.wf1,) self.assertTrue(is_moderation_enabled(self.pg1))
def test_returns_true_with_override_no_moderation_object(self): self.assertTrue(is_moderation_enabled(self.pg1))