From 6970099a76a8713da7744da40b462985b2c82a6a Mon Sep 17 00:00:00 2001 From: Tim Burke Date: Wed, 29 Jun 2016 14:30:39 -0700 Subject: [PATCH] Fix intermittent bulk delete unit test failures Change-Id: I0822b14d7b1ddae5fe0cc567c7cbaf544cb081ee Closes-Bug: 1588414 --- test/unit/common/middleware/test_bulk.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/test/unit/common/middleware/test_bulk.py b/test/unit/common/middleware/test_bulk.py index 1439b0bd2e..7399b00231 100644 --- a/test/unit/common/middleware/test_bulk.py +++ b/test/unit/common/middleware/test_bulk.py @@ -639,9 +639,9 @@ class TestDelete(unittest.TestCase): resp_body = ''.join(self.bulk.handle_delete_iter( req, objs_to_delete=objs_to_delete, out_content_type='application/json')) - self.assertEqual( - self.app.delete_paths, ['/delete_works/AUTH_Acc/c/file_a', - '/delete_works/AUTH_Acc/c/file_d']) + self.assertEqual(set(self.app.delete_paths), + set(['/delete_works/AUTH_Acc/c/file_a', + '/delete_works/AUTH_Acc/c/file_d'])) self.assertEqual(self.app.calls, 2) resp_data = utils.json.loads(resp_body) self.assertEqual(resp_data['Response Status'], '400 Bad Request') @@ -655,9 +655,9 @@ class TestDelete(unittest.TestCase): headers={'Accept': 'application/json'}) req.method = 'POST' resp_body = self.handle_delete_and_iter(req) - self.assertEqual( - self.app.delete_paths, - ['/delete_works/AUTH_Acc/c/f', '/delete_works/AUTH_Acc/c/f404']) + self.assertEqual(set(self.app.delete_paths), + set(['/delete_works/AUTH_Acc/c/f', + '/delete_works/AUTH_Acc/c/f404'])) self.assertEqual(self.app.calls, 2) resp_data = utils.json.loads(resp_body) self.assertEqual(resp_data['Number Deleted'], 1) @@ -668,9 +668,9 @@ class TestDelete(unittest.TestCase): headers={'Accept': 'application/json'}) req.method = 'DELETE' resp_body = self.handle_delete_and_iter(req) - self.assertEqual( - self.app.delete_paths, - ['/delete_works/AUTH_Acc/c/f', '/delete_works/AUTH_Acc/c/f404']) + self.assertEqual(set(self.app.delete_paths), + set(['/delete_works/AUTH_Acc/c/f', + '/delete_works/AUTH_Acc/c/f404'])) self.assertEqual(self.app.calls, 2) resp_data = utils.json.loads(resp_body) self.assertEqual(resp_data['Number Deleted'], 1)