diff options
author | anc <alistair.coles@hp.com> | 2014-05-22 16:56:31 +0100 |
---|---|---|
committer | anc <alistair.coles@hp.com> | 2014-05-22 16:56:31 +0100 |
commit | eaf4fcbb8d00e9e974c9408e550154fa3cfeefea (patch) | |
tree | d4279a6293e90724e54839b92c58017ebf7b4779 | |
parent | 258420f41049d92fc0b59b9263c8381bfe513432 (diff) | |
download | python-swiftclient-eaf4fcbb8d00e9e974c9408e550154fa3cfeefea.tar.gz |
Fix wrong assertions in unit tests
A couple of assertTrue in the test_swiftclient.py
unit tests should be assertEqual. Also, the expected
values now need to be bytes literals.
Change-Id: I7cc1bd60d9ba82d1a28fbae2e1243d3c799451bd
-rw-r--r-- | tests/unit/test_swiftclient.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/unit/test_swiftclient.py b/tests/unit/test_swiftclient.py index 2e7a807..eeb8ab8 100644 --- a/tests/unit/test_swiftclient.py +++ b/tests/unit/test_swiftclient.py @@ -727,8 +727,8 @@ class TestPutObject(MockHttpTest): c.put_object(url='http://www.test.com', http_conn=conn, etag='1234-5678', content_type='text/plain') request_header = resp.requests_params['headers'] - self.assertTrue(request_header['etag'], '1234-5678') - self.assertTrue(request_header['content-type'], 'text/plain') + self.assertEqual(request_header['etag'], b'1234-5678') + self.assertEqual(request_header['content-type'], b'text/plain') def test_no_content_type(self): conn = c.http_connection(u'http://www.test.com/') |