def METHOD_NAME():
    doc = create_doc("Document name", ".pdf")
    result = tasks.finish_file.delay(doc.id)
    assert result.status == celery.states.SUCCESS, result.traceback
    doc = Document.objects.get(id=doc.id)  # Get back the updated instance
    assert doc.state == Document.DocumentState.DONE