[CLOUDKITTY] Fix tests cases broken by flask >=2.0.1

Rafael Weingärtner rafaelweingartner at gmail.com
Tue Jun 1 13:55:19 UTC 2021


Hello guys,
I was reviewing the patch
https://review.opendev.org/c/openstack/cloudkitty/+/793790, and decided to
propose an alternative patch (
https://review.opendev.org/c/openstack/cloudkitty/+/793973).

Could you guys review it?

The idea I am proposing is that, instead of mocking the root object
("flask.request"), we address the issue by mocking only the needed methods
and attributes. This facilitates the understanding of the unit test, and
also helps people to pin-point problems right away as the mocked
attributes/methods are clearly seen in the unit test.

-- 
Rafael Weingärtner
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-discuss/attachments/20210601/7870cd9f/attachment.html>


More information about the openstack-discuss mailing list