diff options
author | makkalot <makkalot@gmail.com> | 2008-06-15 16:50:54 +0300 |
---|---|---|
committer | makkalot <makkalot@gmail.com> | 2008-06-15 16:50:54 +0300 |
commit | 3cf6b38bfcfef04d6c537df79be2d8d90a5fc80b (patch) | |
tree | 71bac030964d1d82d90a403965916b0cb38b560b /test | |
parent | f835390c4362d95e6d9084577e662332b82e2a20 (diff) | |
download | func-3cf6b38bfcfef04d6c537df79be2d8d90a5fc80b.tar.gz func-3cf6b38bfcfef04d6c537df79be2d8d90a5fc80b.tar.xz func-3cf6b38bfcfef04d6c537df79be2d8d90a5fc80b.zip |
adding tests for is_all_arguments_registered part
Diffstat (limited to 'test')
-rw-r--r-- | test/unittest/test_func_arg.py | 29 |
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':{}, + } + } + } |