changement vers google drive storage pour les contrats.
CI - Security, Lint & Tests / validate (push) Failing after 1m15s
CI - Security, Lint & Tests / validate (push) Failing after 1m15s
Tentative d'obtenir un token de connection échoue
This commit is contained in:
+16
-4
@@ -28,6 +28,20 @@ from app.storage import (
|
||||
)
|
||||
|
||||
|
||||
def _valid_pdf():
|
||||
"""A real one-page PDF that passes pypdf content validation."""
|
||||
import io
|
||||
|
||||
from pypdf import PdfWriter
|
||||
|
||||
w = PdfWriter()
|
||||
w.add_blank_page(612, 792)
|
||||
buf = io.BytesIO()
|
||||
w.write(buf)
|
||||
buf.seek(0)
|
||||
return buf
|
||||
|
||||
|
||||
class TestDocumentsRoot:
|
||||
def test_the_environment_wins(self, tmp_path, monkeypatch):
|
||||
monkeypatch.setenv('DOCUMENTS_ROOT', str(tmp_path / 'elsewhere'))
|
||||
@@ -165,10 +179,8 @@ class TestThroughTheUploadRoute:
|
||||
|
||||
|
||||
def _pdf():
|
||||
"""The smallest thing pdf_upload_error accepts."""
|
||||
import io
|
||||
|
||||
return io.BytesIO(b'%PDF-1.4\n%%EOF\n')
|
||||
"""The smallest valid one-page PDF that passes pypdf content validation."""
|
||||
return _valid_pdf()
|
||||
|
||||
|
||||
class TestDeletingAnAccountTakesItsDocuments:
|
||||
|
||||
Reference in New Issue
Block a user