From 0ba0259d1a357cf379ccb251242543a42cece20b Mon Sep 17 00:00:00 2001 From: Bahtiar `kalkin-` Gadimov Date: Sun, 8 Nov 2015 21:23:07 +0100 Subject: [PATCH] Extend documentation test/storage.py --- tests/storage.py | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/tests/storage.py b/tests/storage.py index 8a5f949f..763d1f1a 100644 --- a/tests/storage.py +++ b/tests/storage.py @@ -28,6 +28,8 @@ from qubes.tests import QubesTestCase, SystemTestsMixin class TC_00_Storage(SystemTestsMixin, QubesTestCase): + """ This class tests the utility methods from :mod:``qubes.storage`` """ + def test_000_dump(self): """ Dumps storage instance to a storage string """ vmname = self.make_vm_name('appvm') @@ -80,9 +82,13 @@ class TC_00_Storage(SystemTestsMixin, QubesTestCase): class TC_00_Pool(SystemTestsMixin, QubesTestCase): - def test000_no_pool_dir(self): - """ If no pool dir ist configured for a ``XenPool`` assume the default - `/var/lib/qubes/`. + """ This class tests some properties of the 'default' pool. """ + + def test000_default_pool_dir(self): + """ The predefined dir for the default pool should be ``/var/lib/qubes`` + + .. sealso:: + Data :data:``qubes.qubes.defaults['pool_config']``. """ vm = self._init_app_vm() result = qubes.storage.get_pool("default", vm).dir @@ -90,11 +96,11 @@ class TC_00_Pool(SystemTestsMixin, QubesTestCase): self.assertEquals(result, expected) def test001_default_storage_class(self): - """ Check if when using default pool the Storage is ``XenStorage``. """ + """ Check when using default pool the Storage is ``XenStorage``. """ result = self._init_app_vm().storage self.assertIsInstance(result, XenStorage) - def test_002_pool_name(self): + def test_002_default_pool_name(self): """ Default pool_name is 'default'. """ vm = self._init_app_vm() self.assertEquals(vm.pool_name, "default") @@ -109,8 +115,7 @@ class TC_00_Pool(SystemTestsMixin, QubesTestCase): class TC_01_Pool(SystemTestsMixin, QubesTestCase): - """ Test the paths for the default Xen file based storage - (``QubesXenVmStorage``). + """ Test the paths for the default Xen file based storage (``XenStorage``). """ POOL_DIR = '/var/lib/qubes/test-pool'