diff mbox

[3/8] KVM test: add methods to store a installer object in 'env'

Message ID 1293662250-18292-4-git-send-email-lmr@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Lucas Meneghel Rodrigues Dec. 29, 2010, 10:37 p.m. UTC
None
diff mbox

Patch

diff --git a/client/tests/kvm/kvm_utils.py b/client/tests/kvm/kvm_utils.py
index 6362490..1967ddd 100644
--- a/client/tests/kvm/kvm_utils.py
+++ b/client/tests/kvm/kvm_utils.py
@@ -121,6 +121,24 @@  class Env(UserDict.IterableUserDict):
         del self["vm__%s" % name]
 
 
+    def register_installer(self, installer):
+        """
+        Register a installer that was just run
+
+        The installer will be available for other tests, so that
+        information about the installed KVM modules and qemu-kvm can be used by
+        them.
+        """
+        self['last_installer'] = installer
+
+
+    def previous_installer(self):
+        """
+        Return the last installer that was registered
+        """
+        return self.get('last_installer')
+
+
 class Params(UserDict.IterableUserDict):
     """
     A dict-like object passed to every test.