pytest-dev / pytest-flask

A set of pytest fixtures to test Flask applications

Home Page:http://pytest-flask.readthedocs.org/en/latest/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cannot import name 'cached_property' from 'werkzeug'

bbbart opened this issue · comments

Hi,

After updating to werkzeug==1.0.0 and pytest-flask==1.0.0 my tests stopped working with an ImportError: cannot import name 'cached_property' from 'werkzeug'.

Replacing from werkzeug import cached_property with from werkzeug.utils import cached_property in pytest_flask/plugin.py fixes this.

Looks like pytest_flask/plugin.py has been updated with the fix

from werkzeug.utils import cached_property

However, a release might be required?

As of now, it is broken. :( My CI build.

This issue has been fixed in the pytest-flask version >=0.15.1. 🎉

thanks a lot!