diff options
author | makkalot <makkalot@gmail.com> | 2008-05-31 11:48:52 +0300 |
---|---|---|
committer | makkalot <makkalot@gmail.com> | 2008-05-31 11:48:52 +0300 |
commit | 77f20e5f743535c8935eeb2c2d7a750700d108d9 (patch) | |
tree | 501bec208cbf2edb169f36a6e12c7ed9d266fee8 /test | |
parent | 9f5f7cc9357f975c2415b3b0826eeee54be74c05 (diff) | |
download | third_party-func-77f20e5f743535c8935eeb2c2d7a750700d108d9.tar.gz third_party-func-77f20e5f743535c8935eeb2c2d7a750700d108d9.tar.xz third_party-func-77f20e5f743535c8935eeb2c2d7a750700d108d9.zip |
unittest fixed and should add more and more to make it perfect :)
Diffstat (limited to 'test')
-rw-r--r-- | test/unittest/test_func_arg.py | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/test/unittest/test_func_arg.py b/test/unittest/test_func_arg.py index adee9f0..daec346 100644 --- a/test/unittest/test_func_arg.py +++ b/test/unittest/test_func_arg.py @@ -13,17 +13,25 @@ #tester module for ArgCompatibility from func.minion.modules.func_arg import ArgCompatibility -class ArgCompatibilityTest: +class TestArgCompatibility: def setUp(self): #create the simple object - ac = ArgCompatibility(self.dummy_arg_getter()) - print self.dummy_arg_getter() + self.ac = ArgCompatibility(self.dummy_arg_getter()) + + def test_arg_compatibility(self): + """ + Testing the method argument compatiblity + """ + result = self.ac.validate_all() + #self.assert_on_fault(result) + assert result == True def dummy_arg_getter(self): """ A simple method to test the stuff we have written for arg compatiblity. I just return a dict with proper stuff + Should more an more tests here to see if didnt miss something """ return { 'hifunc':{ @@ -50,16 +58,9 @@ class ArgCompatibilityTest: 'some_string':{ 'type':'string', - 'validato': "^[a-zA-Z]$",} # validator is a re string for those whoo need better validation... + 'validator': "^[a-zA-Z]$",} # validator is a re string for those whoo need better validation... } } - def test_arg_compatibility(self): - """ - Simple test - """ - result = self.ac.validate_all() - #self.assert_on_fault(result) - assert result == False - + |