From c89bfe2722566f852a93bac966691cf1af2ad29a Mon Sep 17 00:00:00 2001 From: Sabari Kumar Murugesan Date: Wed, 18 Mar 2015 11:44:06 -0700 Subject: [PATCH] Fix intermittent failure in test_vmware_store The test test_delete_non_existing was failing intermittently due to a missing mock. Change-Id: If231fd1d7b88a48e2011306cfca620ac7e0ad41e --- tests/unit/test_vmware_store.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/unit/test_vmware_store.py b/tests/unit/test_vmware_store.py index 7b2175f4..6837513e 100644 --- a/tests/unit/test_vmware_store.py +++ b/tests/unit/test_vmware_store.py @@ -225,7 +225,8 @@ class TestStore(base.StoreBaseTest, HttpConn.return_value = FakeHTTPConnection(status=404) self.assertRaises(exceptions.NotFound, self.store.get, loc) - def test_delete_non_existing(self): + @mock.patch('oslo_vmware.api.VMwareAPISession') + def test_delete_non_existing(self, mock_api_session): """ Test that trying to delete an image that doesn't exist raises an error """