dimanche 23 août 2015

How can I mock patch for jinja2 filter in HTML?

I want to mock and patch for url_for method in HTML.

<link href="{{ url_for('static', filename='some.css') }}">

How can I mock patch for html? I tried to mock but cannot.

@mock.patch('templates.myhtml.url_for', return_value='/')
...

Aucun commentaire:

Enregistrer un commentaire