Fix failing unit tests

* Some benchmark validation unit tests failing due to changes in
  python-novaclient common exception class

Change-Id: I2b65564f0eadd4d7ed881e05b46cae7c8f68f190
Closes-Bug: #1340530
This commit is contained in:
Rohan Kanade 2014-07-11 08:05:30 +02:00
parent ae659666e2
commit 895f3cbc55

View File

@ -246,7 +246,8 @@ class ValidationUtilsTestCase(test.TestCase):
def test_flavor_exists_fail(self, mock_osclients):
fakenclient = fakes.FakeNovaClient()
fakenclient.flavors = mock.MagicMock()
fakenclient.flavors.get.side_effect = nova_exc.NotFound(code=404)
fakenclient.flavors.get.side_effect = nova_exc.NotFound(
http_status=404)
mock_osclients.nova.return_value = fakenclient
validator = validation.flavor_exists("flavor")
test_flavor_id = 101
@ -459,7 +460,8 @@ class ValidationUtilsTestCase(test.TestCase):
fakenclient = fakes.FakeNovaClient()
fakenclient.flavors = mock.MagicMock()
fakenclient.flavors.get.side_effect = nova_exc.NotFound(code=404)
fakenclient.flavors.get.side_effect = nova_exc.NotFound(
http_status=404)
mock_osclients.nova.return_value = fakenclient
validator = validation.image_valid_on_flavor("flavor", "image")