Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_generate_content(monkeypatch):
monkeypatch.setattr(mistune, "Markdown", mock.MagicMock())
monkeypatch.setattr(premailer, "transform", mock.MagicMock())
monkeypatch.setattr(renderer, "HighlightRenderer", mock.MagicMock())
monkeypatch.setattr(jinja2, "Template", mock.MagicMock())
renderer.HighlightRenderer.return_value = 1
premailer.transform.return_value = ""
jinja2.Template.render.return_value = ""
renderer.generate_content("")
mistune.Markdown.assert_called_with(renderer=1)