def METHOD_NAME(self):
    generator = BareResourceGenerator()
    generator.data = MagicMock(
        return_value=[
            {"type": "html", "data": "Page 1"},
            {"type": "html", "data": "Page 2"},
        ]
    )
    (pdf_file, filename) = generator.pdf("Test")
    pdf = PdfFileReader(BytesIO(pdf_file))
    self.assertEqual(pdf.getNumPages(), 2)