Use List for allowed_origin
... to get rid of the following warning in unit test jobs. DEPRECATED: The `allowed_origin` keyword argument in `add_origin()` should be a list, found String. Change-Id: I6265fa1bea2c05d9b46f45802e8766d702ae1ff7
This commit is contained in:
parent
82ea5d5680
commit
727da0ffa9
@ -39,7 +39,7 @@ class TestCORSMiddleware(integrated_helpers._IntegratedTestBase):
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user