[CLOUDKITTY] Fix tests cases broken by flask >=2.0.1
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
Thanks a lot Rafael for fixing this gate blocker! On Tue, 1 Jun 2021 at 15:55, Rafael Weingärtner <rafaelweingartner@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
Glad to help! On Tue, Jun 8, 2021 at 5:19 AM Pierre Riteau <pierre@stackhpc.com> wrote:
Thanks a lot Rafael for fixing this gate blocker!
On Tue, 1 Jun 2021 at 15:55, Rafael Weingärtner <rafaelweingartner@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
-- Rafael Weingärtner
participants (2)
-
Pierre Riteau
-
Rafael Weingärtner