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
This commit is contained in:
anc 2014-05-22 16:56:31 +01:00
parent 258420f410
commit eaf4fcbb8d

@ -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/')