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

Pierre Riteau pierre at stackhpc.com
Tue Jun 8 08:18:28 UTC 2021


Thanks a lot Rafael for fixing this gate blocker!

On Tue, 1 Jun 2021 at 15:55, Rafael Weingärtner
<rafaelweingartner at gmail.com> wrote:
>
> 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



More information about the openstack-discuss mailing list