Don't .lower() a literal

It feels silly, and we don't do it for any of the other headers in
headers_to_container_info.

While we're at it, clean up a stray '

Change-Id: I0745038cc3832a77d064e515c37cacbdcb97c4d9
Related-Change: Iea3d06de80210e9e504e296d4572583d7ffabeac
This commit is contained in:
Tim Burke 2016-01-25 09:25:20 -08:00
parent 0e91aa8368
commit fc9a3852e4
2 changed files with 2 additions and 3 deletions

View File

@ -169,8 +169,7 @@ def headers_to_container_info(headers, status_int=HTTP_OK):
'object_count': headers.get('x-container-object-count'),
'bytes': headers.get('x-container-bytes-used'),
'versions': headers.get('x-versions-location'),
'storage_policy': headers.get('X-Backend-Storage-Policy-Index'.lower(),
'0'),
'storage_policy': headers.get('x-backend-storage-policy-index', '0'),
'cors': {
'allow_origin': meta.get('access-control-allow-origin'),
'expose_headers': meta.get('access-control-expose-headers'),

View File

@ -4309,7 +4309,7 @@ class TestServiceToken(unittest2.TestCase):
a token from the test service user. We save options here so that
do_request() can make the appropriate request.
:param method: The operation (e.g'. 'HEAD')
:param method: The operation (e.g. 'HEAD')
:param use_service_account: Optional. Set True to change the path to
be the service account
:param container: Optional. Adds a container name to the path