summaryrefslogtreecommitdiffstats
path: root/funcweb/funcweb/tests/test_widget_validation.py
diff options
context:
space:
mode:
authormakkalot <makkalot@gmail.com>2008-06-21 16:47:00 +0300
committermakkalot <makkalot@gmail.com>2008-06-21 16:47:00 +0300
commit5c82990da0323d638b632152d1dc8ee338c16664 (patch)
tree3971d4a7274fdd0f9eabe7d4a793851749627395 /funcweb/funcweb/tests/test_widget_validation.py
parent4706ba8c79bfae2feb48fc7fd8b9bb7770077ae4 (diff)
downloadfunc-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/test_widget_validation.py')
-rw-r--r--funcweb/funcweb/tests/test_widget_validation.py13
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)