Nir Soffer has uploaded a new change for review.

Change subject: tests: Unify RedirectionChecker method names
......................................................................

tests: Unify RedirectionChecker method names

Rename:
- check -> check_method
- check_call -> check_method_call

Change-Id: I140c9cf24b96def2af2ac50024823963b2f075a8
Signed-off-by: Nir Soffer <[email protected]>
---
M tests/sdm_indirection_tests.py
1 file changed, 15 insertions(+), 12 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/59/49959/1

diff --git a/tests/sdm_indirection_tests.py b/tests/sdm_indirection_tests.py
index 7df44f3..3bfa2a6 100644
--- a/tests/sdm_indirection_tests.py
+++ b/tests/sdm_indirection_tests.py
@@ -432,14 +432,14 @@
         self.source_instance = source_instance
         self.target_name = target_name
 
-    def check(self, fn, args, result):
+    def check_method(self, fn, args, result):
         target = getattr(self.source_instance, self.target_name)
         getattr(self.source_instance, fn)(*args)
         self.assertEqual(result, target.__recording__)
 
-    def check_call(self, fn, nr_args=0):
+    def check_method_call(self, fn, nr_args=0):
         args = tuple(range(nr_args))
-        self.check(fn, args, [(fn, args, {})])
+        self.check_method(fn, args, [(fn, args, {})])
 
     def check_classmethod_call(self, fn, nr_args=0):
         args = tuple(range(nr_args))
@@ -466,10 +466,12 @@
     def test_getrepopath(self):
         # The private method _getRepoPath in StorageDomain calls the public
         # method getRepoPath in the StorageDomainManifest.
-        self.checker.check('_getRepoPath', (), [('getRepoPath', (), {})])
+        self.checker.check_method('_getRepoPath', (),
+                                  [('getRepoPath', (), {})])
 
     def test_nonexisting_function(self):
-        self.assertRaises(AttributeError, self.checker.check_call, 'foo')
+        self.assertRaises(AttributeError,
+                          self.checker.check_method_call, 'foo')
 
     @permutations([
         # dom method, manifest method, nargs
@@ -480,7 +482,8 @@
     ])
     def test_clusterlock(self, dom_method, manifest_method, nr_args):
         args = tuple(range(nr_args))
-        self.checker.check(dom_method, args, [(manifest_method, args, {})])
+        self.checker.check_method(dom_method, args,
+                                  [(manifest_method, args, {})])
 
     @permutations([
         ['getReadDelay', 0],
@@ -516,7 +519,7 @@
         ['validateCreateVolumeParams', 3],
         ])
     def test_common_functions(self, fn, nargs):
-        self.checker.check_call(fn, nargs)
+        self.checker.check_method_call(fn, nargs)
 
 
 @expandPermutations
@@ -543,7 +546,7 @@
         ['rmDCImgDir', 2],
     ])
     def test_block_functions(self, fn, nargs=0):
-        self.checker.check_call(fn, nargs)
+        self.checker.check_method_call(fn, nargs)
 
     @permutations([
         ['metaSize', 1],
@@ -576,7 +579,7 @@
         ['getImageDir', 2],
     ])
     def test_functions(self, fn, nargs):
-        self.checker.check_call(fn, nargs)
+        self.checker.check_method_call(fn, nargs)
 
 
 @expandPermutations
@@ -606,7 +609,7 @@
         ['getVolType', 0],
         ])
     def test_functions(self, fn, nargs):
-        self.checker.check_call(fn, nargs)
+        self.checker.check_method_call(fn, nargs)
 
     @permutations([
         ['formatMetadata', 1],
@@ -640,7 +643,7 @@
         ['_setrw', 1],
         ])
     def test_functions(self, fn, nargs):
-        self.checker.check_call(fn, nargs)
+        self.checker.check_method_call(fn, nargs)
 
 
 @expandPermutations
@@ -661,7 +664,7 @@
         ['_setrw', 1],
         ])
     def test_functions(self, fn, nargs):
-        self.checker.check_call(fn, nargs)
+        self.checker.check_method_call(fn, nargs)
 
     @permutations([
         ['file_setrw', 2],


-- 
To view, visit https://gerrit.ovirt.org/49959
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I140c9cf24b96def2af2ac50024823963b2f075a8
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <[email protected]>
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to