Example #1
0
 def test_cannot_unpublish_internal(self):
     resource = resourceInfoType_model.objects.get(pk=self.resource_id)
     resource.storage_object.publication_status = INTERNAL
     resource.storage_object.save()
     unpublish_resources(None, None, (resource,))
     self.assertEquals("internal", resource.publication_status())
Example #2
0
 def test_can_unpublish_published(self):
     resource = resourceInfoType_model.objects.get(pk=self.resource_id)
     resource.storage_object.publication_status = PUBLISHED
     resource.storage_object.save()
     unpublish_resources(None, None, (resource,))
     self.assertEquals("ingested", resource.publication_status())