diff options
| author | Salvatore Orlando <salvatore.orlando@eu.citrix.com> | 2011-02-25 08:34:11 +0000 |
|---|---|---|
| committer | Tarmac <> | 2011-02-25 08:34:11 +0000 |
| commit | 460475cbb6397bc294a55dee94040447d889949c (patch) | |
| tree | ce88e11ada9c661a0804fe02413dc02363583805 /nova/tests | |
| parent | ed7c71f56c5f5e2ba71273cf0099393fb986ebf9 (diff) | |
| parent | 8e2ebb1a963f58514d8fb6aab4a75627e72484b9 (diff) | |
The proposed bug fix stubs out the _is_vdi_pv routine for testing purposes.
Diffstat (limited to 'nova/tests')
| -rw-r--r-- | nova/tests/test_xenapi.py | 1 | ||||
| -rw-r--r-- | nova/tests/xenapi/stubs.py | 6 |
2 files changed, 7 insertions, 0 deletions
diff --git a/nova/tests/test_xenapi.py b/nova/tests/test_xenapi.py index 6b8efc9d8..2cbe58aab 100644 --- a/nova/tests/test_xenapi.py +++ b/nova/tests/test_xenapi.py @@ -167,6 +167,7 @@ class XenAPIVMTestCase(test.TestCase): stubs.stubout_session(self.stubs, stubs.FakeSessionForVMTests) stubs.stubout_get_this_vm_uuid(self.stubs) stubs.stubout_stream_disk(self.stubs) + stubs.stubout_is_vdi_pv(self.stubs) self.stubs.Set(VMOps, 'reset_network', reset_network) glance_stubs.stubout_glance_client(self.stubs, glance_stubs.FakeGlance) diff --git a/nova/tests/xenapi/stubs.py b/nova/tests/xenapi/stubs.py index 624995ada..4fec2bd75 100644 --- a/nova/tests/xenapi/stubs.py +++ b/nova/tests/xenapi/stubs.py @@ -130,6 +130,12 @@ def stubout_stream_disk(stubs): stubs.Set(vm_utils, '_stream_disk', f) +def stubout_is_vdi_pv(stubs): + def f(_1): + return False + stubs.Set(vm_utils, '_is_vdi_pv', f) + + class FakeSessionForVMTests(fake.SessionBase): """ Stubs out a XenAPISession for VM tests """ def __init__(self, uri): |
