@json_view(permission='view_tender')
    def get(self):
        if self.request.params.get('download'):
            return get_file(self.request)
        document = self.request.validated['document']
        document_data = document.serialize("view")
        document_data['previousVersions'] = [
            i.serialize("view")
            for i in self.request.validated['documents']
            if i.url != document.url
        ]
        return {'data': document_data}
Test the displaying of one blog post
dataset/ETHPy150Open openprocurement/openprocurement.api/src/openprocurement/api/views/tender_document.py/TenderDocumentResource.get--crossover with--dataset/ETHPy150Open eugenkiss/Simblin/test/test_views.py/TestPost.test_singleview