Minor cleanup of repeated identical test assertions

assertDictContainsSubset is being called multiple times with
same arguments in a loop. Since assertDictContainsSubset is
deprecated form python 3.2, replace it with checks on
individual key, value pairs.

Change-Id: I7089487710147021f26bd77c36accf5751855d68
This commit is contained in:
Alistair Coles 2015-12-15 15:49:42 +00:00
parent ae2ed049b6
commit 2f4b79233e

View File

@ -725,7 +725,8 @@ class TestFuncs(unittest.TestCase):
expected_headers = {'x-base-meta-size': '151M',
'connection': 'close'}
for k, v in expected_headers.items():
self.assertDictContainsSubset(expected_headers, dst_headers)
self.assertIn(k, dst_headers)
self.assertEqual(v, dst_headers[k])
self.assertEqual('', dst_headers['Referer'])
def test_client_chunk_size(self):