From 83e6ea477d04032c71abdbb10c10191bfd5c695f Mon Sep 17 00:00:00 2001 From: Sean Dague Date: Wed, 21 Sep 2016 10:46:18 -0400 Subject: [PATCH] Fix invalid exception mock for InvalidNUMANodesNumber There is a required field of "nodes" for this exception, which our mock was not providing. This created a warning spam during test runs (though it did not actually fail the tests). Change-Id: Ib9521f5efe5939d470c2662d1d59e22a9ccf5ff4 (cherry picked from commit bf6280ee269e8621a4d4709e4ae7f821c753625a) --- nova/tests/unit/api/openstack/compute/test_serversV21.py | 1 + 1 file changed, 1 insertion(+) diff --git a/nova/tests/unit/api/openstack/compute/test_serversV21.py b/nova/tests/unit/api/openstack/compute/test_serversV21.py index a427da10b4df..5518d238406a 100644 --- a/nova/tests/unit/api/openstack/compute/test_serversV21.py +++ b/nova/tests/unit/api/openstack/compute/test_serversV21.py @@ -3266,6 +3266,7 @@ class ServersControllerCreateTest(test.TestCase): @mock.patch.object(compute_api.API, 'create', side_effect=exception.InvalidNUMANodesNumber( + nodes='-1', details='')) def test_create_instance_raise_invalid_numa_nodes(self, mock_create): self.assertRaises(webob.exc.HTTPBadRequest,