From c4ee4203555a793c95c6f9f36e488c8e30b81d31 Mon Sep 17 00:00:00 2001 From: Gary Kotton Date: Wed, 24 Jul 2013 23:57:12 -0700 Subject: [PATCH] Ensure that uuid is returned with mocked instance Fixes bug 1204798 Change-Id: Icf8f1f63be4b7492ef3f788836db2c0d23477567 --- nova/tests/network/test_manager.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/nova/tests/network/test_manager.py b/nova/tests/network/test_manager.py index 2f77f52de0..33a7c24334 100644 --- a/nova/tests/network/test_manager.py +++ b/nova/tests/network/test_manager.py @@ -331,7 +331,8 @@ class FlatNetworkTestCase(test.TestCase): fixed_ips=mox.IgnoreArg()).AndReturn(None) db.instance_get_by_uuid(self.context, - mox.IgnoreArg()).AndReturn({'display_name': HOST}) + mox.IgnoreArg()).AndReturn({'display_name': HOST, + 'uuid': FAKEUUID}) db.network_get(mox.IgnoreArg(), mox.IgnoreArg(), @@ -374,7 +375,8 @@ class FlatNetworkTestCase(test.TestCase): fixed_ips=mox.IgnoreArg()).AndReturn(None) db.instance_get_by_uuid(self.context, - mox.IgnoreArg()).AndReturn({'display_name': HOST}) + mox.IgnoreArg()).AndReturn({'display_name': HOST, + 'uuid': FAKEUUID}) db.network_get_by_uuid(mox.IgnoreArg(), mox.IgnoreArg()).AndReturn(networks[0]) @@ -461,7 +463,8 @@ class FlatNetworkTestCase(test.TestCase): fixed_ips=mox.IgnoreArg()).AndReturn(None) db.instance_get_by_uuid(self.context, - mox.IgnoreArg()).AndReturn({'display_name': HOST}) + mox.IgnoreArg()).AndReturn({'display_name': HOST, + 'uuid': FAKEUUID}) db.network_get_by_uuid(mox.IgnoreArg(), mox.IgnoreArg()).AndReturn(networks[0])