summaryrefslogtreecommitdiffstats
path: root/nova/tests
diff options
context:
space:
mode:
authorTodd Willey <todd@ansolabs.com>2011-01-25 15:56:55 -0800
committerTodd Willey <todd@ansolabs.com>2011-01-25 15:56:55 -0800
commit5fdf1132f3418c1f6ecaa5593835536db9895085 (patch)
tree4c39262cdbabec3f069af493aeb6c2d069af7614 /nova/tests
parent7ff50565f33f3e854fe6261bb6c7be36f1ddbd9b (diff)
Change how libvirt firewall drivers work to have meaningful flags.
Diffstat (limited to 'nova/tests')
-rw-r--r--nova/tests/test_virt.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/nova/tests/test_virt.py b/nova/tests/test_virt.py
index 0b9b847a0..1760b73ab 100644
--- a/nova/tests/test_virt.py
+++ b/nova/tests/test_virt.py
@@ -221,7 +221,12 @@ class IptablesFirewallTestCase(test.TestCase):
self.project = self.manager.create_project('fake', 'fake', 'fake')
self.context = context.RequestContext('fake', 'fake')
self.network = utils.import_object(FLAGS.network_manager)
- self.fw = libvirt_conn.IptablesFirewallDriver()
+
+ class Mock(object):
+ pass
+ self.fake_libvirt_connection = Mock()
+ self.fw = libvirt_conn.IptablesFirewallDriver(
+ get_connection=lambda: self.fake_libvirt_connection)
def tearDown(self):
self.manager.delete_project(self.project)