diff options
author | Jenkins <jenkins@review.openstack.org> | 2016-08-31 00:58:02 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2016-08-31 00:58:02 +0000 |
commit | 98085c961fc9421ffb07e62dacee67da9b7fcd16 (patch) | |
tree | 22244770ee6b32ac00eeef7d51f2e6278ea56f36 /tests/unit/test_swiftclient.py | |
parent | 39b9db35a0fb4db988725b68c129cb45cbb5f733 (diff) | |
parent | ab60e08e2e34ac4a87bc6c1701c6ace69bb392cf (diff) | |
download | python-swiftclient-98085c961fc9421ffb07e62dacee67da9b7fcd16.tar.gz |
Merge "Convert numeric and boolean header values to strings"
Diffstat (limited to 'tests/unit/test_swiftclient.py')
-rw-r--r-- | tests/unit/test_swiftclient.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/unit/test_swiftclient.py b/tests/unit/test_swiftclient.py index 0095447..7e753e9 100644 --- a/tests/unit/test_swiftclient.py +++ b/tests/unit/test_swiftclient.py @@ -185,9 +185,9 @@ class TestHttpHelpers(MockHttpTest): def test_encode_meta_headers(self): headers = {'abc': '123', - u'x-container-meta-\u0394': '123', - u'x-account-meta-\u0394': '123', - u'x-object-meta-\u0394': '123'} + u'x-container-meta-\u0394': 123, + u'x-account-meta-\u0394': 12.3, + u'x-object-meta-\u0394': True} r = swiftclient.encode_meta_headers(headers) @@ -199,6 +199,7 @@ class TestHttpHelpers(MockHttpTest): for k, v in r.items(): self.assertIs(type(k), binary_type) self.assertIs(type(v), binary_type) + self.assertIn(v, (b'123', b'12.3', b'True')) def test_set_user_agent_default(self): _junk, conn = c.http_connection('http://www.example.com') |