Comment 10 for bug 2004174

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

Reviewed: https://review.opendev.org/c/openstack/cinder/+/877185
Committed: https://opendev.org/openstack/cinder/commit/41da45ddd3b9677b4ee7f82f1a59e3bca9dee615
Submitter: "Zuul (22348)"
Branch: master

commit 41da45ddd3b9677b4ee7f82f1a59e3bca9dee615
Author: Khadija Kamran <email address hidden>
Date: Mon Mar 13 01:14:01 2023 +0500

    Improve test_execute_root_and_helper

    Pass autospec=True while patching the function.
    Create the mock object for mock_helper using mock.sentinel. This gives
    us some extra protection because sentinel object is not callable. If the
    code tries to use it like a function, it will raise a TypeError.
    This patch also changes assertFalse() to assert_not_called().

    Partial-Bug: #2004174
    Change-Id: I209ff5d0fd7e3eaa0b50dcbf71ff4b0960403f96
    Signed-off-by: Khadija Kamran <email address hidden>