from signing_service.domain.ports.pdf_signer import PDFSignerPort class FakePDFSigner(PDFSignerPort): """ Fake implementation of PDFSignerPort. It does NOT sign a real PDF. It only simulates the behavior for testing and development. """ def sign(self, pdf_bytes: bytes, certificate: str, password: str) -> bytes: # Simulación simple: # añadimos un marcador para indicar "firmado" signature_marker = f"\n\n-- Signed with certificate: {certificate} and password: {password}".encode() return pdf_bytes + signature_marker