Remove use of removeprefix
This is not supported on Python 3.8 [1]. I have no idea why this was not failing CI. [1] https://docs.python.org/3.9/library/stdtypes.html#str.removeprefix Change-Id: I225e9ced0f75c415b1d2fee05440291e3d8635c0 Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
This commit is contained in:
parent
6a67b5f03f
commit
3ccf82ef9e
|
@ -635,7 +635,9 @@ class NovaProxyRequestHandlerTestCase(test.NoDBTestCase):
|
|||
# now the same url but with extra leading '/' characters removed.
|
||||
if expected_cpython in errmsg:
|
||||
location = result[3].decode()
|
||||
location = location.removeprefix('Location: ').rstrip('\r\n')
|
||||
if location.startswith('Location: '):
|
||||
location = location[len('Location: '):]
|
||||
location = location.rstrip('\r\n')
|
||||
self.assertTrue(
|
||||
location.startswith('/example.com/%2F..'),
|
||||
msg='Redirect location is not the expected sanitized URL',
|
||||
|
|
Loading…
Reference in New Issue