summaryrefslogtreecommitdiffstats
path: root/funcweb
diff options
context:
space:
mode:
authormakkalot <makkalot@gmail.com>2008-06-29 13:46:14 +0300
committermakkalot <makkalot@gmail.com>2008-06-29 13:46:14 +0300
commit836cf17a8ec5ef5e36f3087730707395f3a0f2e6 (patch)
tree329782dbd32366498008a5e28a2d7e61108a56c1 /funcweb
parent0da32797cd5fbbc82458426331147701ca35bc0e (diff)
downloadfunc-836cf17a8ec5ef5e36f3087730707395f3a0f2e6.tar.gz
func-836cf17a8ec5ef5e36f3087730707395f3a0f2e6.tar.xz
func-836cf17a8ec5ef5e36f3087730707395f3a0f2e6.zip
writing unittests for add_special_list method
Diffstat (limited to 'funcweb')
-rw-r--r--funcweb/funcweb/tests/test_widget_automation.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/funcweb/funcweb/tests/test_widget_automation.py b/funcweb/funcweb/tests/test_widget_automation.py
index 74e9ae0..90f60a2 100644
--- a/funcweb/funcweb/tests/test_widget_automation.py
+++ b/funcweb/funcweb/tests/test_widget_automation.py
@@ -40,7 +40,16 @@ class TestWidgetListFactory(unittest.TestCase):
"""
Testing the internals of the special list widget
"""
- pass
+ test_list_data = self.get_test_default_args()['list_default']
+ widget_list_object = self.widget_factory.get_widgetlist_object()
+ #not very efficient but works
+ #hash_widget_object should be a widgets.RepeatingFieldSet
+ hash_widget_object = [h_obj for h_obj in widget_list_object if getattr(h_obj,'name')=='list_default'][0]
+
+ assert isinstance(hash_widget_object.fields[0],widgets.TextField) == True
+ assert getattr(hash_widget_object.fields[0],'name') == 'listfield'
+ assert getattr(hash_widget_object.fields[0],'label') == 'List Field'
+
def test_add_specialized_hash(self):
"""