diff --git a/cinder/tests/unit/test_test.py b/cinder/tests/unit/test_test.py index b59244c1ac8..659f8e156e4 100644 --- a/cinder/tests/unit/test_test.py +++ b/cinder/tests/unit/test_test.py @@ -38,8 +38,13 @@ class IsolationTestCase(test.TestCase): def test_rpc_consumer_isolation(self): class NeverCalled(object): - def __getattribute__(*args): - self.fail(msg="I should never get called.") + def __getattribute__(self, name): + if name == 'target': + # oslo.messaging 5.31.0 explicitly looks for 'target' + # on the endpoint and checks it's type, so we can't avoid + # it here, just ignore it if that's the case. + return + self.fail(msg="I should never get called. name: %s" % name) server = rpc.get_server(messaging.Target(topic='volume', server=cfg.CONF.host),