From eaf4fcbb8d00e9e974c9408e550154fa3cfeefea Mon Sep 17 00:00:00 2001 From: anc <alistair.coles@hp.com> Date: Thu, 22 May 2014 16:56:31 +0100 Subject: [PATCH] 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 --- tests/unit/test_swiftclient.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/unit/test_swiftclient.py b/tests/unit/test_swiftclient.py index 2e7a8073..eeb8ab82 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/')