summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authormakkalot <makkalot@gmail.com>2008-06-15 16:50:54 +0300
committermakkalot <makkalot@gmail.com>2008-06-15 16:50:54 +0300
commit3cf6b38bfcfef04d6c537df79be2d8d90a5fc80b (patch)
tree71bac030964d1d82d90a403965916b0cb38b560b /test
parentf835390c4362d95e6d9084577e662332b82e2a20 (diff)
downloadthird_party-func-3cf6b38bfcfef04d6c537df79be2d8d90a5fc80b.tar.gz
third_party-func-3cf6b38bfcfef04d6c537df79be2d8d90a5fc80b.tar.xz
third_party-func-3cf6b38bfcfef04d6c537df79be2d8d90a5fc80b.zip
adding tests for is_all_arguments_registered part
Diffstat (limited to 'test')
-rw-r--r--test/unittest/test_func_arg.py29
1 files changed, 28 insertions, 1 deletions
diff --git a/test/unittest/test_func_arg.py b/test/unittest/test_func_arg.py
index 1b9102c..8f0c967 100644
--- a/test/unittest/test_func_arg.py
+++ b/test/unittest/test_func_arg.py
@@ -33,7 +33,14 @@ class TestArgCompatibility:
self.ac = ArgCompatibility(self.dummy_empty_args())
result = self.ac.validate_all()
assert result == True
-
+
+ def test_is_all_arguments_registered(self):
+ #create the dummy class
+ tc = FooClass()
+ arguments = tc.register_method()
+ assert self.ac.is_all_arguments_registered(tc,'foomethod',arguments['foomethod']['args'])==True
+ print arguments
+
def dummy_no_getter(self):
return {}
@@ -112,5 +119,25 @@ class TestArgCompatibility:
}
+class FooClass(object):
+ """
+ Sample class for testing the is_all_arguments_registered
+ method functionality ...
+ """
+
+ def foomethod(self,arg1,arg5,arg4,*arg,**kw):
+ pass
+ def register_method(self):
+ return{
+ 'foomethod':{
+ 'args':{
+ 'arg1':{},
+ 'arg4':{},
+ 'arg5':{},
+ 'arg':{},
+ 'kw':{},
+ }
+ }
+ }