def make_pdf_fixture(filename, text=None):
if text is None:<EOL><INDENT>text = "<STR_LIT>" % filename<EOL><DEDENT>from reportlab.pdfgen import canvas<EOL>output = BytesIO()<EOL>c = canvas.Canvas(output)<EOL>c.drawString(<NUM_LIT:100>, <NUM_LIT:100>, text)<EOL>c.showPage()<EOL>c.save()<EOL>return make_file_fixture(filename, stringio_to_base64(output))<EOL>
Generate a PDF fixture.

    It's suitable for use with Werkzeug test client and Flask test request
    context.
    Use of this function requires that reportlab have been installed.

    :param filename: Desired filename.
    :param text: Text to include in PDF. Defaults to "Filename: <filename>", if
        not specified.