Merge "Make sure [cors] allowed_origin accepts a list value"

This commit is contained in:
Zuul
2025-11-25 09:13:40 +00:00
committed by Gerrit Code Review

View File

@@ -433,7 +433,7 @@ class CORSConfigFixture(fixture.GabbiFixture):
def _mock_getattr(instance, key):
if key != 'allowed_origin':
return self._original_call_method(instance, key)
return "http://valid.example.com"
return ["http://valid.example.com"]
self._original_call_method = cfg.ConfigOpts.GroupAttr.__getattr__
cfg.ConfigOpts.GroupAttr.__getattr__ = _mock_getattr