misc: fix unittest PropertyMock usage

Fix usage of unittest.mock.PropertyMock which caused the test case test_throws_no_exception_when_infra_operator_recreates_mq_user_secret to occasionally fail with TypeError: class <yaook.op.infra.resources.DynamicSecretHandler component='optional_secret_ref'> has component <MagicMock name='mock()' id='...'>, which is not a string.

As a part of this we might also remove the wrapper class testutils.MagicMock, but at least it helped to find out that the MagicMock was not created by Yaook directly, so it was not completely useless.

Edited by Theresa Schüttig

Merge request reports

Loading