diff options
author | makkalot <makkalot@gmail.com> | 2008-06-21 16:47:00 +0300 |
---|---|---|
committer | makkalot <makkalot@gmail.com> | 2008-06-21 16:47:00 +0300 |
commit | 5c82990da0323d638b632152d1dc8ee338c16664 (patch) | |
tree | 3971d4a7274fdd0f9eabe7d4a793851749627395 /funcweb/funcweb/tests | |
parent | 4706ba8c79bfae2feb48fc7fd8b9bb7770077ae4 (diff) | |
download | func-5c82990da0323d638b632152d1dc8ee338c16664.tar.gz func-5c82990da0323d638b632152d1dc8ee338c16664.tar.xz func-5c82990da0323d638b632152d1dc8ee338c16664.zip |
the final validator hash is done with its tests , happy testing :)
Diffstat (limited to 'funcweb/funcweb/tests')
-rw-r--r-- | funcweb/funcweb/tests/test_widget_validation.py | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/funcweb/funcweb/tests/test_widget_validation.py b/funcweb/funcweb/tests/test_widget_validation.py index 5cba250..adb4a15 100644 --- a/funcweb/funcweb/tests/test_widget_validation.py +++ b/funcweb/funcweb/tests/test_widget_validation.py @@ -90,11 +90,16 @@ class TestWidgetValidator(unittest.TestCase): print "Happy test!" - def test_list_validator(self): - wf = WidgetSchemaFactory(self.get_list_params()) + def test_list_validator(self,the_type='list'): + if the_type == 'list': + testing_data = self.get_list_params() + else: + testing_data = self.get_hash_params() + + wf = WidgetSchemaFactory(testing_data) schema_man=wf.get_ready_schema() - for argument_name,arg_options in self.get_list_params().iteritems(): + for argument_name,arg_options in testing_data.iteritems(): #print argument_name #should all the argument names really assert hasattr(schema_man,argument_name)==True @@ -112,6 +117,8 @@ class TestWidgetValidator(unittest.TestCase): print "Happy test!" + def test_hash_validator(self): + self.test_list_validator(the_type = 'hash') def test_minion_int_validator(self): mv=MinionIntValidator(max = 44,min=2) |