'A given document can be deleted, and will create a corresponding DocumentDeletionLog.'

def test_delete_document(self):

    factory = RequestFactory()
    request = factory.get(self.ban_testuser_url)
    request.user = self.admin
    success = delete_document(request, None)
    self.assertFalse(success)
    self.assertFalse(DocumentDeletionLog.objects.exists())
    success = delete_document(request, self.document)
    self.assertTrue(success)
    self.assertFalse(Document.objects.filter(id=self.document.id).exists())
    self.assertTrue(DocumentDeletionLog.objects.exists())
